Advancing Cursor

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a userform with a combobox and two text boxes. Currently, I can only
advance the cursor from one box to another with the right tab key. How can I
change it so that the ENTER key advances the cursor to the next box?

Thanks,
Les
 
Use the Keydown event of TextBox1 as

Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal
Shift As Integer)
If KeyCode = 13 Then TextBox2.SetFocus
End Sub

Hope this helps!!
 
In the properties window of the VBE, set the EnterKeyBehavior to False
for each text box.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"WLMPilot"
wrote in message
I have a userform with a combobox and two text boxes. Currently, I can only
advance the cursor from one box to another with the right tab key. How can I
change it so that the ENTER key advances the cursor to the next box?
Thanks,
Les
 
Back
Top