Key down event
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If Me.Dirty Then If KeyCode = vbKeyPageDown Or _ KeyCode = vbKeyPageUp Then KeyCode = 0 End If End If End Sub