Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default TRYING FIGURE out how wide a text box should be in userform

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default TRYING FIGURE out how wide a text box should be in userform

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

--
Rick (MVP - Excel)


"Bruce" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default TRYING FIGURE out how wide a text box should be in userform

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

"Rick Rothstein" wrote in message
...
Did you want the width of the TextBox to vary with the user's entry? If
so, set the AutoSize property to True.

--
Rick (MVP - Excel)


"Bruce" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
covert figure in to text bmurlidhar Excel Discussion (Misc queries) 5 October 3rd 08 09:07 AM
printing wide text katie300m Excel Discussion (Misc queries) 0 January 26th 07 05:52 PM
Text Too Wide for Cell FLKULCHAR Excel Discussion (Misc queries) 3 November 1st 05 10:19 PM
TEXT IN CELL, but not too wide FLKULCHAR Excel Discussion (Misc queries) 3 October 18th 05 11:39 PM
change figure to text randall1000 Excel Discussion (Misc queries) 3 January 28th 05 03:11 PM


All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"