Hi:
I need to add a menu item with the shortcut F10. But apparently there is no combination of F10(F10 / Shift + F10 etc) available on the menu Item dialog box.
Is there a workaround to this problem?
Printable View
Hi:
I need to add a menu item with the shortcut F10. But apparently there is no combination of F10(F10 / Shift + F10 etc) available on the menu Item dialog box.
Is there a workaround to this problem?
set your menu items.
for the one with F10
Caption = FakeIt F10
name = mnuFakeIt
shortcut = none
then add this to your form....
whenever f10 is press it will execute the code
you put into it which would be the same code
as in mnuFakeIt
...Hope it helps..
Option Explicit
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF10: MsgBox "code for menu here"
End Select
End Sub
Private Sub Form_Load()
Form1.KeyPreview = True
End Sub
If you want to use F10 as a shortcut key on a menu, you just do:
And in the Form_Keydown, do as HeSaidJoe said.Code:Private Sub Form_Load()
mnuabout.caption = "About" & Chr$(9) & "F10"
End Sub