Highlighting text in text box

  • Thread starter Thread starter Craig Wilks
  • Start date Start date
C

Craig Wilks

Using SetFocus to have the cursor located in a text box each time, what
is the code to have the default text highlighted ready for a new entry
without first having to block or delete the existing textbox contents?

Craig Wilks
 
Hi,

Set the enterfield behaviuor:

..EnterFieldBehavior = fmEnterFieldBehaviorSelectAll

Then use SetFocus to set the focus to it.

Regards,

Jan Karel Pieterse
Excel TA/MVP
 
Back
Top