place this in the Key Down property of the control or form
Select Case KeyCode
' If user presses insert or shift
Case 45, 16
' Disable the keystroke by setting it to 0
KeyCode = 0
Case Else
Debug.Print KeyCode, Shift
End Select
to find the code for any key press create a web page and place it on your desk top and paste the following code in the html page when you press a key it will display the value
Steve728,
You're not exactly "disabling the key," you're just capturing the keystroke in this form only, and canceling (or changing) it's normal action.
Case 45
' Disable the usual action by setting it to 0
KeyCode = 0
'code to call the fancy sub routine with the new action
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.