On each form I have the following sub:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'***********************
'* Ignore function keys *
'***********************
Select Case KeyCode
Case vbKeyPageUp
KeyCode = 0
Case vbKeyPageDown
KeyCode = 0
Case vbKeyPageDown
KeyCode = 0
Case vbKeyF1
KeyCode = 0
Case vbKeyF2
KeyCode = 0
Case vbKeyF3
KeyCode = 0
Case vbKeyF4
KeyCode = 0
Case vbKeyF5
KeyCode = 0
Case vbKeyF6
KeyCode = 0
Case vbKeyF7
KeyCode = 0
Case vbKeyF8
KeyCode = 0
Case vbKeyF9
KeyCode = 0
Case vbKeyF10
KeyCode = 0
Case vbKeyF11
KeyCode = 0
Case vbKeyF12
KeyCode = 0
Case vbKeyPageUp
KeyCode = 0
Case vbKeyPageDown
KeyCode = 0
End Select
End Sub
Is it possible to place a variation of this code in a global module that would affect all forms throughout the entire application?
Thanks, in advance, for your guidance.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Fellow title is reserved for select members who demonstrate sustained contributions, industry leadership, and outstanding performance. We will announce the experts being inducted into the Experts Exchange Fellowship during the annual Expert Awards, but unlike other awards, Fellow is a lifelong status. This title may not be given every year if there are no obvious candidates.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.