escape from combo box using enter


Posted by David on April 10, 2001 8:40 AM

How do I escape out of a combo box after making my
selection using the keyboard
Instead of the mouse?
Something like on enter go to the next cell



Posted by Dave Hawley on April 10, 2001 10:17 PM

Hi David

Use a ComboBox from the "Control Toolbox" toolbar then use this code:

Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
ComboBox1.TopLeftCell.Offset(2, 0).Select
End If
End Sub

Dave

OzGrid Business Applications