Shortcut of menu-item

J

Jos Vens

Hi,

I know how to change the text of a menu, and how to assign a procedure, but
I can't assign the shortcut to that item. Here's a part of my procedure
which changes the Print-item of the File menu.

If (vItem.ID = 4) Then
vItem.Caption = "Print mySheet"
vItem.OnAction = "TB_PrintDialog"
vItem.ShortcutText = "Ctrl+P"
End If

The text Ctrl+P is there, but if I press Ctrl+P on my keyboard, the standard
Print-dialog comes in stead of TB_PrintDialog. If I choose the item in the
menu, I get TB_PrintDialog.

Do you have any advise?
Thanks
Jos Vens
 
T

Tom Ogilvy

If you want to use Ctrl+P to fire your menu item, I believe you would have
to use the Onkey method to assign your onaction macro to the key combination
Ctrl+P.
 

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