View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Add not compiling

Is there anything in the addin that would make this macro execute when the
addin is loaded. Just like any other workbook, if you want code to run, you
have to trigger it. If you don't, then there's your huckleberry.

--
Regards,
Tom Ogilvy

"will" wrote in message
om...
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