Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry for the delay on the answer, I was away on vacation with no acces
to internet. Are you sure Keyup and Keydown are triggered by Enter because i doesn't do it here. I did Private Sub tbData_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVa Shift As Integer) MsgBox (KeyCode) End Sub And when I press any button on the textbox I get a msgbox saying it' code but when I press Enter nothing appears and the focus changes t the next control. Best Regards Noo -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
From Help for the Keyup and Keydown events (so yes, Enter does trigger the
event except for the exception cited). Also note the particular information on Enter when the focus switches - so you should be using the KeyDown. Of course, a quick trip to the help screen would have cleared this all up for you. The KeyDown and KeyUp events do not occur under the following circumstances: a.. The user presses enter on a form with a command button whose Default property is set to True. b.. The user presses esc on a form with a command button whose Cancel property is set to True. The KeyDown and KeyPress events occur when you press or send an ANSI key. The KeyUp event occurs after any event for a control caused by pressing or sending the key. If a keystroke causes the focus to move from one control to another control, the KeyDown event occurs for the first control, while the KeyPress and KeyUp events occur for the second control. -- Regards, Tom Ogilvy "NooK " wrote in message ... Sorry for the delay on the answer, I was away on vacation with no access to internet. Are you sure Keyup and Keydown are triggered by Enter because it doesn't do it here. I did Private Sub tbData_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) MsgBox (KeyCode) End Sub And when I press any button on the textbox I get a msgbox saying it's code but when I press Enter nothing appears and the focus changes to the next control. Best Regards NooK --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Increase size of a Forms Check Box (click on to enter check mark) | Excel Discussion (Misc queries) | |||
how can I check for cell focus inside a spreadsheet ? | Excel Worksheet Functions | |||
How do I get the focus on a check box? | New Users to Excel | |||
must press enter 2x to move cell focus | Excel Discussion (Misc queries) | |||
Setting form controls focus and enter key | Excel Programming |