Highlight text in textboxes

  • Thread starter Thread starter Frederick Chow
  • Start date Start date
F

Frederick Chow

Hi all,

A simple question: How can I programmatcially highlight text in a textbox?
Textbox.SetFocus doesn't work. Thanks for your advcie in advance.

Frederick Chow
 
With TextBox1
.SelStart = 1
.SelLength = Len(.Text)
.SetFocus
End With

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Bob Phillips said:
With TextBox1
.SelStart = 1
.SelLength = Len(.Text)
.SetFocus
End With

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

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