D
Dan
The simplest things can make me crazy.
I have a simple user form. It has three text boxes, and one button (OK).
The text boxes have their TabIndexes set to 0, 1, and 2, and the button has
it's tab index set to 3.
As the user fills in the boxes, I want the focus to shift from box 1 to box
2 to box 3, and finally to the OK button.
I have set the TabIndex in the properties for each control at design time. I
have also added the statements to the Userform_activate() block:
textbox1.tabindex=0
etc.
And here's what happens.
User enters a value in the text box 1. Pressing tab takes the focus to:
TAB ---> OK button
TAB ---> text box 1
TAB ---> text box 2
TAB ---> OK button
TAB ---> text box 1
TAB ---> text box 2
TAB ---> text box 3
TAB ---> OK button
And then, pressing tab does what I want it to do:
text box 1 ---> text box 2 ---> text box 3 ---> OK button.
So it's messed up the first time through, then it works right.
Can somebody give me an idea for what to look for here? Is there something
else I need to set in software?
Thanks in advance -
Dan
I have a simple user form. It has three text boxes, and one button (OK).
The text boxes have their TabIndexes set to 0, 1, and 2, and the button has
it's tab index set to 3.
As the user fills in the boxes, I want the focus to shift from box 1 to box
2 to box 3, and finally to the OK button.
I have set the TabIndex in the properties for each control at design time. I
have also added the statements to the Userform_activate() block:
textbox1.tabindex=0
etc.
And here's what happens.
User enters a value in the text box 1. Pressing tab takes the focus to:
TAB ---> OK button
TAB ---> text box 1
TAB ---> text box 2
TAB ---> OK button
TAB ---> text box 1
TAB ---> text box 2
TAB ---> text box 3
TAB ---> OK button
And then, pressing tab does what I want it to do:
text box 1 ---> text box 2 ---> text box 3 ---> OK button.
So it's messed up the first time through, then it works right.
Can somebody give me an idea for what to look for here? Is there something
else I need to set in software?
Thanks in advance -
Dan