How to select the entire Text in a textbox on click

  • Thread starter Thread starter dancollette
  • Start date Start date
D

dancollette

Hi,

I was wondering how to do in VBA the following.

On the on click event of a textbox i want the cursor to place itself at the
beginning and highlihgjt the value, just as if I would Tab into the control.

I remember that there was a method that would allow that but I dont remember
how.....

Thanks in advance

Daniel
 
Hi Daniel,

Use the SelStart and SelLength properties of the Textbox.
 

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