Disappearing Text in textbox

S

scottnshelly

i gotta userform with some text boxes. the people that will be usin
this userform are not computer literate. is it possible to put text i
the textbox like "type here" but make the text go away when it'
clicked? i've tried a few things like
textbox1.value = "type here"
private sub textbox1_click
textbox1.value = ""

no soup.
what else should i try?
thanks MVP's
 
V

Vasant Nanavati

Try:

Private Sub TextBox1_MouseDown(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
TextBox1 = ""
End Sub
 
D

David

Vasant Nanavati wrote
Private Sub TextBox1_MouseDown(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
TextBox1 = ""
End Sub

Is there something similar I can use to detect when a user starts typing an
entry into TextBox1 to make default "<store name>" go away?
 
D

David

David wrote
Is there something similar I can use to detect when a user starts
typing an entry into TextBox1 to make default "<store name>" go away?

Got it worked:

Private Sub UserForm_Initialize()
With Me.TextBox1
..Text = "<store name>"
..SelStart = 0
..SelLength = Len(.Text)
End With
End Sub
 
Top