Resizing Text Boxes
Sub Initialize_TextBox()
' To automatically resize the text box set the AutoSize to True. This will resize the text box as the user types text
TextBox1.AutoSize = True
' The sizing can be limited by providing the maximum length using MaxLength property
TextBox1.MaxLength = 20
' You can inform the user of resing with the Tooltip.
TextBox1.ControlTipText = "Maximum Length is 20"
End Sub
ControlTipText is the VBA variant for Visual Basic ToolTipText
No comments:
Post a Comment