View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Shortcut of menu-item

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.

--
Regards,
Tom Ogilvy


"Jos Vens" wrote in message
...
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