Select text in textbox

  • Thread starter Thread starter Todd Huttenstine
  • Start date Start date
T

Todd Huttenstine

Hey guys

I have done this in the past but I forgot. After I set
focus to textbox1, I need it to highlight all the text in
textbox1.

How do I do this?

Thanks
Todd Huttenstine
 
Private Sub CommandButton1_Click()
TextBox2.SetFocus
TextBox2.SelStart = 0
TextBox2.SelLength = Len(TextBox2.Value)

End Sub
 
thanks
-----Original Message-----
Private Sub CommandButton1_Click()
TextBox2.SetFocus
TextBox2.SelStart = 0
TextBox2.SelLength = Len(TextBox2.Value)

End Sub

--
Regards,
Tom Ogilvy





.
 

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