Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to use PgDn in a userform (to execute sub bnNext_Click). Is this trivial? possible
Apparently onkey doesn't work in userforms and accelerator keys can only be letters. Am I right Oskar |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this (untested):
Private Sub UserForm_KeyDown(ByVal KeyCode As _ MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 34 Then bnNext_Click End Sub You will also need to put the code in the KeyDown event of any control that is capable of receiving focus, including bn_Next. -- Vasant "Oskar" wrote in message ... I would like to use PgDn in a userform (to execute sub bnNext_Click). Is this trivial? possible? Apparently onkey doesn't work in userforms and accelerator keys can only be letters. Am I right? Oskar |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, Oskar; not quite sure how to do that.
-- Vasant "Oskar" wrote in message ... I take back what I said about "working". OK, I get the next record. However, the "standard event" is executed too! I.e. in a combo box I get the new record but with a new value in the combo box (depending on the number of lines defined for that box). How do I prevent the "standard event" to be executed? Oskar |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Apparently you have to reset the keycode (to 0). See 'Prevent "standard" key event in userform' (http://communities2.microsoft.com/co...figuration.xml
Oska P.S. The following is just a test for me to see if a shorter reference may work |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets | Excel Discussion (Misc queries) | |||
Using <PgDn changes active cell. | New Users to Excel | |||
Ctrl+pgup pgdn can't jump worksheets | Excel Worksheet Functions | |||
Userform inside another userform | Excel Programming | |||
Userform | Excel Programming |