Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PgUP and PgDn disable not working

Status
Not open for further replies.

mondoray

Technical User
Jul 28, 2003
134
0
0
AU
Guys,

I have used the following code to disable the PgUp and PgDn keys in one of my forms and it is not working.

Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = vbKeyPageUp) Or (KeyCode = vbKeyPageDown) Then
    KeyCode = 0
End If
End Sub

Any suggestions?

mondoray [ponder]
 
Is the forms Key Preview propety set to yes?

Roy-Vidar
 
RoyVidar,

It is now. Many thks for your help.

mondoray [ponder]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top