highlighting the text of a textbox

  • Thread starter Thread starter hawk
  • Start date Start date
H

hawk

I have a form with several textboxes. When the <OK>
button is clicked to close the form, a function is called
to verify that all the textboxes contain appropriate
values. If not, a message is displayed and the first
invalid textbox gets the focus.

What I am having difficulty with is that I would like the
text in that textbox to be highlighted as well. Any ideas
would be appreciated...TIA
 
FYI...

Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
 

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