Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to use VBA to determine if a TextBox or TextFrame
object is sized large enough to display all the text it contains? Thanks, Brian Murphy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brian,
Not great, but maybe this can get you started: 'Assumes 2 textboxes on a WS Private Sub CommandButton3_Click() 'Add a lot of text to TextBox1 TextBox1.Text = "Add a lot of text to TextBox1" & vbNewLine & "Add a lot of text to TextBox1" & vbNewLine & "Add a lot of text to TextBox1" & vbNewLine & "Add a lot of text to TextBox1" With TextBox2 .AutoSize = False .Text = TextBox1.Text .AutoSize = True If .Height TextBox1.Height Then MsgBox "Text does not fit" End If End With End Sub NickHK wrote in message ups.com... Is there a way to use VBA to determine if a TextBox or TextFrame object is sized large enough to display all the text it contains? Thanks, Brian Murphy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
TextFrame.Characters.Text returns truncated string | Excel Programming | |||
Interesting problem with VBA generated textbox (or textframe of shape) length | Excel Programming | |||
Text not fully displayed when text direction changed | Excel Discussion (Misc queries) | |||
Highlight all Text in a Textbox when the textbox is selected | Excel Programming | |||
.TextFrame.Characters.Text property readOnly in function?? | Excel Programming |