Help with label and form width

G

Guest

So I have a kind of help form built because I do not understand how to create
an HTML help file. The form loads from a user making a selection from a
previous form of help topics. I have each line designated as a label and a
case statement depending on which topic they chose that will populate the
labels' captions. (LblLine1.Caption = strLine1, LblLine2.Caption = strLine2,
etc.)
My question is that I want the form and all labels to be able to grow or
shrink to the largest string so all are visible. I used an IIF to find the
largest string since there did not seem to be a Max function built anywhere
in VBA, and now I have a value as a long but the width of the labels and
forms are in twips. Any help on finding how many characters are in a twip?
 
M

Marshall Barton

twen said:
So I have a kind of help form built because I do not understand how to create
an HTML help file. The form loads from a user making a selection from a
previous form of help topics. I have each line designated as a label and a
case statement depending on which topic they chose that will populate the
labels' captions. (LblLine1.Caption = strLine1, LblLine2.Caption = strLine2,
etc.)
My question is that I want the form and all labels to be able to grow or
shrink to the largest string so all are visible. I used an IIF to find the
largest string since there did not seem to be a Max function built anywhere
in VBA, and now I have a value as a long but the width of the labels and
forms are in twips. Any help on finding how many characters are in a twip?


If you're using a proportional font, there is no formula to
covert the number of characters to the length of the string.
You would need something like the fTextWidthHeight function
at www.lebans.com

Note that I have serious doubts about your approach and I
suspect that you are digging youself into a hole. Can't
you just concatenate the various lines into one long string
and stuff that into a single text box?
 

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