I have two Excel picture objects linked to different forms, each with a text box and OK/Cancel buttons. In one form, the text cursor is in the textbox when clicking the object which is what I want:
but in another it selects the OK command button rather than have the text cursor in the textbox:
I've gone through the form and textbox/command button properties and see nothing about selection, and the 'correct' macro properties appear to be the same as the 'incorrect' one.
What do I do to change the form such that when it's opened the text cursor goes to the textbox instead of the command button being selected?
Quite easy solution is to change TabIndex Property
to 0.
So, 1) go to VBA Editor, 2) select your TextBox in your UserForm and 3) change TabIndex
Property in Property window as presented below.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With