Defining a Shortcut Key to an Existing Macor in "Personal.xlsb"

JeepChick

New Member
Joined
Jan 20, 2006
Messages
5
Hi Everyone,

It's been awhile since I've posted here but I always get the answer I'm needing so I hope someone can help me with this one.

I'm trying to assing as shortcut key to an already-existing macro in my Personal.xlsb workbook. I would like to execute this macro in other workbooks using the shortcut key.

My macro is called "PIVOT_TABLE" and I'd like to assign <ctl> + <shift> + <T> to my macro. I found code that's supposed to do that, but it's not working. The code is shown below:

Application.MacroOptions Macro:=”PIVOT_TABLE”, HasShortcutKey:=True, ShortcutKey:=”T”

Does this look right to you? If so, why is it not working for me? The macro "PIVOT_TABLE" is working fine if I run it directly from Personal.xlsb.

All help is greatly appreciated...thanks!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hit Alt + F8, select the macro you want to associate your keyboard shortcut with, click Options, then enter the key you want to have a shortcut for.
 
Upvote 0
Hit Alt + F8, select the macro you want to associate your keyboard shortcut with, click Options, then enter the key you want to have a shortcut for.

Hi, thanks for your response. I know how to do what you describe, but I need to do it through code. I have a very large audience that will be doing this and I don't want to have to instruct each of them to do the above. Want to do it through code. Any other ideas?
 
Upvote 0
Okay, I resolved my own issue with some research. The following worked:

Application.OnKey Key:="%^t", Procedure:="C:\Program Files\Microsoft Office2007\Office12\XLSTART\Personal.xlsb!FTP_PIVOT"
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top