How to auto fit font in some field

G

Guest

My report is contains 8 fields (table form), All field is size 12 tahoma
font. Sometimes data in somefields is larger than table size. How can I auto
decrease font to fit in those field ?
 
M

Marshall Barton

Nova said:
My report is contains 8 fields (table form), All field is size 12 tahoma
font. Sometimes data in somefields is larger than table size. How can I auto
decrease font to fit in those field ?


Use the fTextWidthHeight function at www.lebans.com

Dim intFS As Integer

For intFS = 12 To 6 Step -1
txtbox.FontSize = intFS
If fTextHeight(txtbox) < txtbox.Height - 20 _
And fTextWidth(txtbox) < txtbox.Width - 20 _
Then Exit For
Next intFS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top