I have been trying to trap the F1 function key - I have tried two methods - see code below - But I cannot trap the F1 key or the TAB key(using TAB here just so they are different calls) - My code is called from a UserForm (when it is activated) - wondering if that is why it is not working
Code:Private Sub DemoOnKey() Application.OnKey "{TAB}", "Message" End Sub Private Sub Message() Call ReadHelpFile(Language) End Sub Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case vbKeyF1 Call ReadHelpFile(Language) End Select End Sub







Reply With Quote
Bookmarks