Home |
Search |
Today's Posts |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gary
i just have a question here. how come i can hit enter to move between text boxes on my form? There is no commandbutton with Default=true on your form. Those hijack Enter. i don't have any code, other than to limit number entry to a couple of fields. the EnterKeyBehavior is set to false, which means enter moves the focus to the next object in the tab order. I believe it's there to prevent lineshifts in strings where those aren't wanted. They might as well use the discarded Enters for something useful. Just guessing. now, when i get to a frame with checkboxes, enter does nothing and tab moves to the next checkbox. Enter makes no meaning to most other objects, there is no lineshift in a checkbox. You can write code for it in the same way, either to Tab on Private Sub CheckBox1_KeyDown(ByVal KeyCode As _ MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then KeyCode = 9 End Sub or to toggle value Private Sub CheckBox2_KeyDown(ByVal KeyCode As _ MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then CheckBox2.Value = Not CheckBox2.Value End Sub or whatever you need Private Sub CheckBox3_KeyDown(ByVal KeyCode As _ MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then Call InstallLinux End Sub HTH. Best wishes Harald |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
move to the right after hitting enter using macros | Excel Discussion (Misc queries) | |||
Automatically move to adjacent cells without hitting Enter | Excel Discussion (Misc queries) | |||
Hitting Enter to Move Cursor to the Next Entry Cell | Excel Worksheet Functions | |||
What does hitting Ctrl + Shift + Enter to enter a formula do??? Help a n00b out. | Excel Worksheet Functions | |||
Cursor not to move when hitting the enter key | Excel Worksheet Functions |