I've sought out answers to this question many times, and have found solutions, but they didn't appear to work in my case. I think, unproven, the showmodal property of a userform has an effect on the success of many of the readily available solutions found through searches. (involving setfocus and complex selection formula)
I have a userform. The user enters a value in a textbox (tab position 2). A beforeupdate event triggers and checks the appropriateness of the data entered into the textbox by the user.
If an inappropriate entry is identified, the user is notified, and the offending entry is overwritten with a default value. The user is then able to re-enter another value.
As it works now, after the entry is replaced with the default, the highlighting of the textbox awaiting data entry is at the next textbox in tabular order. (tab order 3).
How can I keep the the selection highlighting in the original field (tab order 2) after the correction is made rather than jumping to the next? With this, the user must click and highlight the contents of the original textbox ... an annoyance and time consuming when entering a lot of data.
When I use SetFocus, nothing happens. The value in the textbox (tab stop 3) is highlighted, not the original.