TRYING FIGURE out how wide a text box should be in userform

B

Bruce

I am trying to create a form programically.

I have different varying lenth of fields. I am sure there has to be a way to
calculate the width of the field, based on the font size and the number of
characters. Any ideas how to figure the width?

Thanks
Bruce
 
R

Rick Rothstein

Did you want the width of the TextBox to vary with the user's entry? If so,
set the AutoSize property to True.
 
B

Bruce

They are to be fixed width. I need to figure out the width so that I can
programically build a set of forms. What I want to do is to have all of the
definition in a spreadsheet, and for columnA in the form, the eidth would be
in starting (left) would be at x position. I know what the length in chars
each cell should be. I figure I should be able to calculate for the next
column on the form , knowing the starting position, the length of the field
and then the FONT SIZE. I would have thought it would be pretty forward, in
the following fasion nextrow pos = left +(FONT.SIZE*CHARLEN)+ pad
But it does not seem to be very accurate

Thanks
Bruce
 

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