View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
will will is offline
external usenet poster
 
Posts: 11
Default Help with shortcut key code

I have created a bunch of macros and want to assign shortcut keys to
them using code instead of the tools option method since you have to
assign to a letter using that method. I have a bunch of subs that are
very basic and work when I use F5. To assign macros I created the
following code in the same module as the subs.

Public Sub Workbook_Open()
With Application
.OnKey key:="+^{$}", procedu="fmtDollar"
.OnKey key:="+^{%}", procedu="fmtPercent"
.OnKey key:="+^{!}", procedu="fmtComma"
.OnKey key:="+^{~}", procedu="fmtGeneral"
End With
End Sub

I cannot for the life of me figure out why the subs won't fire using
ctrl+shift+4, ctrl+shift+5 etc...

Any help is greatly appreciated.