Message 1 of 8
Maximum width of text within VBA textbox control

Not applicable
12-06-2004
08:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Does anyone have a method to find the maximum width of text within a VBA
multiline text box?
I'd like something to find the longest line of text of a note such as:
8" CONCRETE CAP SLAB
REINFORCE W/ #5 @ 8" O.C. EA WAY
ELEVATION TOP SLAB 108-0
The only property I can find is the .CurX Property.
VB has the .Textwidth method, but it doesn't appear to exist in VBA.
The reason is I'd like to size the textbox control to be fairly
representative of the maximum length of the longest line within the textbox
control.