I’m trying to resolve the difference between the operation of the SetFocus method in Access and in Excel. In Access, issuing a SetFocus method on a form textbox will position the cursor at the beginning of any text already in that box and select (or highlight) that text. This way the next and subsequent keys pressed will automatically replace those that were selected. In Excel VBA this does not seem to happen. Instead, SetFocus on a textbox control will simply position the cursor at the end of any text already in that box selecting nothing. Highlighting to replace any text has to be down manually.
Is there any way in Excel VBA code to select (or highlight) any text already in a text box when bringing it into focus?
As always, thank you for your time,
John Littell