I’m successfully using the below to increase the size of a "txtCommentBox" on the UserForm so I can see the full TextBox input values.
That’s fine and does what I wanted, however the enlarged TextBox is then obscuring/covering over parts of the UserForm which is causing a hassle.
How can I down size the "txtCommentBox" when “Focus” is lost/shifted from the TextBox to another CommandButton on the UserForm
That’s fine and does what I wanted, however the enlarged TextBox is then obscuring/covering over parts of the UserForm which is causing a hassle.
How can I down size the "txtCommentBox" when “Focus” is lost/shifted from the TextBox to another CommandButton on the UserForm
Excel Formula:
'This automatically changes the size of the "txtCommentBox" to fit the text that’s being entered into it.
Private Sub txtCommentBox_Change()
On Error Resume Next
'Can change the " * 15" to suit your needs
txtCommentBox.Height = txtCommentBox.LineCount * 15
On Error GoTo 0
End Sub