PC Review


Reply
Thread Tools Rate Thread

Advancing Cursor

 
 
=?Utf-8?B?V0xNUGlsb3Q=?=
Guest
Posts: n/a
 
      20th Sep 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UHJhbmF2IFZhaWR5YQ==?=
Guest
Posts: n/a
 
      20th Sep 2007
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!!
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"WLMPilot" wrote:

> 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

 
Reply With Quote
 
Jim Cone
Guest
Posts: n/a
 
      20th Sep 2007

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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i keep the cursor from advancing after enter taxplan Microsoft Excel Misc 1 3rd Sep 2009 08:10 PM
Advancing =?Utf-8?B?QnJpemVl?= Microsoft Powerpoint 1 28th Nov 2006 09:02 PM
slide advancing Kurt Van Keymeulen Microsoft Powerpoint 3 2nd Aug 2004 11:54 PM
Advancing to next slide =?Utf-8?B?RGlhbmU=?= Microsoft Powerpoint 1 23rd Jan 2004 01:15 AM
Cursor not advancing following event execution David S. Microsoft Access Form Coding 2 24th Oct 2003 05:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:50 AM.