MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Combobox question?? Can I set a tab order on a worksheet (NON-VBA combo boxes)?


Posted by Edgar on March 28, 2001 6:03 AM

I have a workbook which has 5 comboboxes on one of the worksheets.
I have them working the way I want them to but I would like to know
whether or not it was possible to select a tab order for these combo
boxes. It is kind of annoying to have to click out of them with the
mouse, I would like to be able to either hit "Enter" or "Tab" and be
able to exit the said combo boxes. Please help if possible! Thanks to
all in advance.

Edgar


Posted by David Hawley on March 29, 2001 3:40 AM


Hi Edgar

You would need Combos from the Control Toolbox for this, then you would have to use some code like this.


Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 9 Then NextBox
End Sub

Private Sub NextBox()
Me.ComboBox2.Activate
End Sub

Dave

OzGrid Business Applications