Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default PgDn in UserForm

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default PgDn in UserForm

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default PgDn in UserForm

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default PgDn in UserForm

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
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
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets DrDave Excel Discussion (Misc queries) 1 July 28th 08 04:12 AM
Using <PgDn changes active cell. sheana New Users to Excel 1 February 3rd 08 03:43 PM
Ctrl+pgup pgdn can't jump worksheets [email protected] Excel Worksheet Functions 0 August 2nd 06 04:48 PM
Userform inside another userform Ryan Excel Programming 0 April 23rd 04 08:01 PM
Userform Tish Excel Programming 0 January 12th 04 06:08 PM


All times are GMT +1. The time now is 03:48 PM.

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

About Us

"It's about Microsoft Excel"