Thread: Shortcuttext
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Shortcuttext

I am just setting up some shortcut keys for some commandbar button items.

I can get Ctrl-Shift-x to work quite simply by tagging this code onto a
commandbar button

.ShortcutText = "Ctrl+Shift+X"
Application.MacroOptions Macro:=.OnAction, _
HasShortcutKey:=True, _
ShortcutKey:="X"

What is the code for other key combinations, such as Alt-Shift and letter?

And on a related topic, why is it that if I change the macro option to a
named macro the compiler objects? I would like to direct my shortcut text to
invoke a different macro to the menu click (the reason being that on menu
click macro I am using the the ActionControl property, which won't be in
scope when I use a shortcutkey).

Bob