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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Oversensitive touchpad on modern laptops 0
Wordwrap 2
Access Textbox - Hide Cursor 0
Pointing specific textbox 6
Condensing Task 2
Keydown Problem 4
Controlling cursor w/ macro 4
ENTER instead of TAB 3

Back
Top