Hello
I'm having a hard time coding the F2 key to trigger a specific action on a form.
I tried this sample code I got form the net and it just won't work;
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF2 Then
MsgBox "You Pressed F2!"
End If
End Sub
If I change vbKeyF2 for vbEnter, it works fine. What's wrong with my F2 key?
Thanks!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only