W
will
I created an add-in with some basic sub routines. I also have a sub
routine that I am using to assign shortcuts to the other subs.
Sub OnKey()
With Application
..OnKey "+^4", "fmtDollar"
..OnKey "+^5", "fmtPercent"
..OnKey "+^1", "fmtComma"
..OnKey "+^`", "fmtGeneral"
End With
End Sub
The problem is that with the add-in loaded, when I open excel, the
shortcut keys don't work. However, if I go into the code and hit F5 to
compile it and then go back to my worksheet the shortcut keys work
fine.
Any ideas as to why I need to compile this everytime? Any help is
greatly appreciated.
Regards,
Will
routine that I am using to assign shortcuts to the other subs.
Sub OnKey()
With Application
..OnKey "+^4", "fmtDollar"
..OnKey "+^5", "fmtPercent"
..OnKey "+^1", "fmtComma"
..OnKey "+^`", "fmtGeneral"
End With
End Sub
The problem is that with the add-in loaded, when I open excel, the
shortcut keys don't work. However, if I go into the code and hit F5 to
compile it and then go back to my worksheet the shortcut keys work
fine.
Any ideas as to why I need to compile this everytime? Any help is
greatly appreciated.
Regards,
Will