Disable Pg Up and Pg Down

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need to disable the Page Up and Page Down buttons for a sub-form only.
Any assistantance will be appreciated.
 
1. Open the subform in design view.

2. Set its KeyPreview property to Yes.

3. Add code to the KeyDown event of the form.

4. If the KeyCode matches vbKeyUp or vbKeyDown, destroy the keystroke by
setting KeyCode to zero.
 
Back
Top