View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
[email protected] dgp@dodgeit.com is offline
external usenet poster
 
Posts: 28
Default Add-In Keyboard Shortcut

I'm sorry I don't follow any of the discussion about menus but I think
I can answer the orginal question. Here are two ways to add a keyboard
shortcut to an add-in subroutine:

Manually:
1) Open the macro listToolsMacroMacros...
2) You won't see your subroutine listed, but when you type in the full
name of the macro the Options button will become enabled. Click the
Options button and enter your shortcut.
3) Be sure to save your add-in from the VBE window.

By Code:
1) Write a Private Sub in your add-in.
2) Enter the following code:
Application.MacroOptions Macro:="MyMacro", _
HasShortCutKey:=True, _
ShortcutKey:="V" 'Alt+Shift+v
3) Run this macro from the VBE window once and save the add-in.

Dave Parker

mvyvoda wrote:
i am using an add-in to store macro's ("personal.xla" in C:\Documents and
Settings\mvyvoda\Application Data\Microsoft\AddIns). I need to have a
keyboard shortcut to one fuction within this add-in. The macro list (Alt-F8)
does not list any macro's in personal.xla.

i'm not even sure where to start.

thanks,
-m