Private Sub Form_Load()
Me.KeyPreview = True
End Sub
Private Sub form_keydown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF6 'Spell Check will not be invoked
KeyCode = 0
MsgBox "Pop goes thw weasle!"
End Select
End Sub
Just replace line with the code behind your buttton, or simply call the OnClick event of the button.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.