Here is some code to prevent users from hitting certain keys that are not part of the alphabet or integers, such as F1, Esc, Ctrl, and so on.
Public Function DisableKeys(KeyCode As Integer)
Select Case KeyCode
Case vbKeyF1 'F1 Key
KeyCode = 0 'Makes it so that if user...