Basically I have a Userform that I have created, and I was wondering if it was possible to add Grey text that is there when the Userform loads but that disappears as soon as the user start to input text into the TextBox:
[image expired]
Once the user starts typing in the font color should change to black.
Any help would be appreciated.
Something Like this?
Private Sub UserForm_Initialize()
TextBox1.ForeColor = &HC0C0C0 '<~~ Grey Color
TextBox1.Text = "Please Enter Name Here"
CommandButton1.SetFocus '<~~ This is required so that the focus moves from TB
End Sub
Private Sub TextBox1_Enter()
With TextBox1
If .Text = "Please Enter Name Here" Then
.ForeColor = &H80000008 '<~~ Black Color
.Text = ""
End If
End With
End Sub
Private Sub TextBox1_AfterUpdate()
With TextBox1
If .Text = "" Then
.ForeColor = &HC0C0C0
.Text = "Please Enter Name Here"
End If
End With
End Sub
ScreenShot (In action)

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With