dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,375
- Office Version
- 365
- 2016
- Platform
- Windows
I have an active x text box that will not increase in size for extra lines of text that are added.
I want it to be a set length, 540 and to increase in size downwards when additional lines of text are added.
This is the code that someone helped me with, can someone tell me what I need to change to get it to work please?
Thanks guys
I want it to be a set length, 540 and to increase in size downwards when additional lines of text are added.
This is the code that someone helped me with, can someone tell me what I need to change to get it to work please?
Code:
Private Sub TextBox1_Change()
TextBox1.Height = TextBox1.Height
TextBox1.Width = 540
End Sub
Private Sub TextBox1_GotFocus()
TextBox1.Width = 540
If TextBox1 = "Please type notes here" Then
TextBox1 = ""
End If
End Sub
Private Sub TextBox1_LostFocus()
TextBox1.Height = TextBox1.Height
TextBox1.Width = 540
If TextBox1 = "" Then
TextBox1 = "Please type notes here"
End If
End Sub
Thanks guys