Disappearing Text in textbox

  • Thread starter Thread starter scottnshelly
  • Start date Start date
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
 
Try:

Private Sub TextBox1_MouseDown(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
TextBox1 = ""
End Sub
 
Thanks,
i knew it would be something along those lines.
Way to go
 
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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top