Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
F2 Key!
Message
From
04/01/2006 10:55:42
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
F2 Key!
Miscellaneous
Thread ID:
01083152
Message ID:
01083152
Views:
64
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
Map
View

Click here to load this message in the networking platform