Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Add-In Keyboard Shortcut

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Add-In Keyboard Shortcut

Application.OnKey "+^D", "MyMacro"

This should create a shortcut Shift-Ctrl-D. If there's any possibility
MyMacro may exist in any other workbook prefix with ThisWorkbook.Name & "!".
Call it from an Open event.

Not sure about naming your addin "Personal.xla" if there may also be a
Personal.xls open, guess it's OK but I wouldn't.

Regards,
Peter T

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Add-In Keyboard Shortcut

Peter,

When I do this, and get rid of the menu already in place (but run your code)
I get an error:

The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found

do you what this means?

Thanks,
-m

"Peter T" wrote:

Application.OnKey "+^D", "MyMacro"

This should create a shortcut Shift-Ctrl-D. If there's any possibility
MyMacro may exist in any other workbook prefix with ThisWorkbook.Name & "!".
Call it from an Open event.

Not sure about naming your addin "Personal.xla" if there may also be a
Personal.xls open, guess it's OK but I wouldn't.

Regards,
Peter T

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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Add-In Keyboard Shortcut

Why do you "get rid of the menu already in place"

Is AddMenu a Sub with no arguments

Do you have a similarly named AddMenu sub in any other workbook (incl
addins), if so did you prefix the way I suggested.

Apart from your Personal.xla do you also have Personal.xls, if so try
renaming the addin.

Regards,
Peter T

"mvyvoda" wrote in message
...
Peter,

When I do this, and get rid of the menu already in place (but run your

code)
I get an error:

The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found

do you what this means?

Thanks,
-m

"Peter T" wrote:

Application.OnKey "+^D", "MyMacro"

This should create a shortcut Shift-Ctrl-D. If there's any possibility
MyMacro may exist in any other workbook prefix with ThisWorkbook.Name &

"!".
Call it from an Open event.

Not sure about naming your addin "Personal.xla" if there may also be a
Personal.xls open, guess it's OK but I wouldn't.

Regards,
Peter T

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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Add-In Keyboard Shortcut

I got rid of the menu already in place to test to see if the ctrl+shift+D
would work if only personal.xla was in place and never ran. also, i did
rename the file, to no avail.

I don't have any other macro's that are similarly named.

AddMenu is a pretty typical routine that merely adds a menu, names it and
places arguments (attached to macros of course) within the menu.

Peter, I really appreciate all your help!!,
-m

"Peter T" wrote:

Why do you "get rid of the menu already in place"

Is AddMenu a Sub with no arguments

Do you have a similarly named AddMenu sub in any other workbook (incl
addins), if so did you prefix the way I suggested.

Apart from your Personal.xla do you also have Personal.xls, if so try
renaming the addin.

Regards,
Peter T

"mvyvoda" wrote in message
...
Peter,

When I do this, and get rid of the menu already in place (but run your

code)
I get an error:

The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found

do you what this means?

Thanks,
-m

"Peter T" wrote:

Application.OnKey "+^D", "MyMacro"

This should create a shortcut Shift-Ctrl-D. If there's any possibility
MyMacro may exist in any other workbook prefix with ThisWorkbook.Name &

"!".
Call it from an Open event.

Not sure about naming your addin "Personal.xla" if there may also be a
Personal.xls open, guess it's OK but I wouldn't.

Regards,
Peter T

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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Add-In Keyboard Shortcut

oh... I misnamed AddMenu. It works now, however I have a final question. I
have a scenario whereby I need this ctrl+shift+D to work in a situation where
someone has never ran the AddMenu routine. Is this possible? Or, do I have to
run AddMenu with the added ctrl+shift+D code before they can use ctrl+shift+D?

If you follow?

Thanks,
-m

"mvyvoda" wrote:

I got rid of the menu already in place to test to see if the ctrl+shift+D
would work if only personal.xla was in place and never ran. also, i did
rename the file, to no avail.

I don't have any other macro's that are similarly named.

AddMenu is a pretty typical routine that merely adds a menu, names it and
places arguments (attached to macros of course) within the menu.

Peter, I really appreciate all your help!!,
-m

"Peter T" wrote:

Why do you "get rid of the menu already in place"

Is AddMenu a Sub with no arguments

Do you have a similarly named AddMenu sub in any other workbook (incl
addins), if so did you prefix the way I suggested.

Apart from your Personal.xla do you also have Personal.xls, if so try
renaming the addin.

Regards,
Peter T

"mvyvoda" wrote in message
...
Peter,

When I do this, and get rid of the menu already in place (but run your

code)
I get an error:

The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found

do you what this means?

Thanks,
-m

"Peter T" wrote:

Application.OnKey "+^D", "MyMacro"

This should create a shortcut Shift-Ctrl-D. If there's any possibility
MyMacro may exist in any other workbook prefix with ThisWorkbook.Name &

"!".
Call it from an Open event.

Not sure about naming your addin "Personal.xla" if there may also be a
Personal.xls open, guess it's OK but I wouldn't.

Regards,
Peter T

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






  #7   Report Post  
Posted to microsoft.public.excel.programming
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


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Add-In Keyboard Shortcut

This most certainly is a work around that will have to do for now.

Thanks,
-m

" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
keyboard shortcut dicksadler Excel Discussion (Misc queries) 0 February 18th 09 11:00 PM
Keyboard shortcut: something new James Silverton[_2_] Excel Discussion (Misc queries) 3 September 23rd 07 01:15 PM
Keyboard shortcut for name box hmm Excel Discussion (Misc queries) 4 August 11th 07 01:02 PM
Keyboard shortcut for Best Fit Ob1Pimpobi Excel Discussion (Misc queries) 1 August 31st 06 01:06 AM
Keyboard Shortcut ArthurJ Excel Discussion (Misc queries) 3 January 12th 06 06:00 AM


All times are GMT +1. The time now is 10:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"