LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Setting form controls focus and enter key

I have a form set up for entering names into my application. On this setup
form I have a

textbox ="NameEntry and a
Listbox = "RepList"
Button1 = "add"
Button2 = "remove"

The users procedure is:

1) Enter name into text box
2) click on the add button

The name is tranfered to the listbox for viewing and the "textbox" is
cleared, but the add button remains in focus

How can I return focus to the textbox? i.e. place the cursor back into the
text box.
Is it possible to set the "enter" key to click the add button instead of
have to actually click it with the mouse?

A KeyPress event does not occur under the following conditions:

a.. Pressing TAB.
b.. Pressing ENTER.
c.. Pressing an arrow key.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form keep the focus unable to get to the code - HELP! Kaz G New Users to Excel 1 January 23rd 08 06:00 PM
Setting the focus Orf Bartrop New Users to Excel 4 August 9th 06 05:36 AM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
must press enter 2x to move cell focus Lynn Excel Discussion (Misc queries) 0 March 18th 05 06:05 PM
Text Box on User Form Set Focus Issue John Flynn Excel Programming 0 September 6th 03 02:41 PM


All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"