- Dec 27, 2016
I need to TAB through a combination of ComboBox(es) and cells in my worksheet. I have written the following code to jump from a ComboBox to a ComboBox:
Private Sub ComboBox1_KeyDown (ByValKeyCode As MSForms.ReturnInteger, ByVal Shift as Integer) If KeyCode = 9 Then ComboBox2.Activate End Sub
|I also write a code to jump from a CELL to a ComboBox (in some places it is needed). Looks like this:|
When you put these two codes side-by-side, you can imagine jumping from Cell A1, to Combobox1, to Combobox2. Well, I have a column from D9 to D208 with 5 ComboBoxes next to each cell, and I need to flow through them all by hitting TAB. I've ended up typing it out manually, but is there a way to make one short command which will loop through all of these without writing 2000+ lines of code?
Also, any input on TabStop property of a combobox? Maybe there's a simpler solution