Understanding UserForm TabIndex

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,564
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a user form with 3 text boxes and two checkboxes.
I am looking to organize the flow of user entry as they tab out of each control. So, textbox1, textbox2, textbox3, checkbox1, checkbox2.
I've adjusted the TabIndex properties for each of those controls setting tabindex 1 to textbox1, 2 to textbox2, 3 to textbox3, 4 to checkbox1 and 5 to checkbox2. However, in runtime, tabbing does not follow that sequence. It's all over the place.

I also included labels and frames in the tab sequence thinking maybe it was those that was throwing things off, but it still didn't provide the desired flow.

Am I missing something?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
In the UserForm designer, rightclick on the background of the userform and select Tab Order, and set it that way.
 
Upvote 0
Hi Jeff! Thank you for your help. This is a new concept for me, so a great learning opportunity.

Things aren't 100%. Using that dialogue. The two checkboxes are in a frame, and I have a feeling that might be causing some grief. In that tab order dialogue, the individual checkboxes aren't listed, only the frame they are in. That being said, I ordered the controls

textbox1
textbox2
textbox3
textbox4
frame1
commandbutton1
commandbutton2
label1
label2
label3
label4

So, in run time, textbox1 takes focus (cursor blinking), user enters data, tabs ... it focuses on checkbox1 (which is locked), then subsequent tabs follow this order:

checkbox2 (which is locked),
commandbutton2,
textbox1 (again)
textbox2
checkbox1
checkbox2
commandbutton2
textbox1
textbox2
textbox3
textbox4
checkbox1
checkbox2
commandbutton2

and then repeats.

Thoughts? Do I need to do anything with the tabindex values in the properties dialogue in the control properties? (ie get rid of them?)
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,234
Members
448,951
Latest member
jennlynn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top