shortcut for add-In menu

K

kikde

hi,

i created an add-In which provides a menu with sub menu-entries

menuMain
submenu CTRL+ALT+L

problem: The menu shortcut does not run. nothing happens.
if I click the menu entry with the mouse, everything is ok.
The shortcut is not blocked from another menu.

here is the sourcecode for the menu-creation:

Set cbctrl = objMenu.Controls.Add(msoControlButton)
With cbctrl
.Caption = "submenu"
.OnAction = "CreateReport"
.ShortcutText = "CTRL+ALT+L"
End With

can anyone help?

Thank's

Jens
 
T

Tom Ogilvy

You would have to set the shortcut keys for the assigned onaction macro to
your shortcut key sequence.

Application.OnKey "+^%l", "CreateReport"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top