How to list all current key bindings?

jjasmith4

Board Regular
Joined
Aug 22, 2018
Messages
59
I have a number of add-ins with procedures to which I bind keystrokes. I want to be able to see what keystrokes are currently bound, either built-ins like Ctrl-P for Print or my custom ones.
I've found that if you export a module whose procedures have key bindings there's an Attribute line which indicates the keystroke.
It looks like this for Ctrl-m:
VBA Code:
Attribute ShowMacroKeys.VB_ProcData.VB_Invoke_Func = "m\n14"
It looks like this for Ctrl-Shift-w:
VBA Code:
Attribute TravelFormulas.VB_ProcData.VB_Invoke_Func = "W\n14"
But doesn't the object model have key bindings buried in it somewhere, sort of like Word.KeyBindings? I've search the Internet, I've search even hidden members in the Object Browser, and I can't find a thing.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I haven't tried it myself but maybe this could help:
 
Upvote 0
Solution
But doesn't the object model have key bindings buried in it somewhere, sort of like Word.KeyBindings? I've search the Internet, I've search even hidden members in the Object Browser, and I can't find a thing.
Sadly, no it does not.
 
Upvote 0
Akuini / RoryA: These are very helpful - thanks! But the weakness is that I need to know where the source code is for macros with keystrokes. What if I don't? For example, I might have company add-ins as part of my Excel installation, they might have keystrokes, their developers might have written the associated Subs in modules with Option Private Module, so Alt-F8 won't show them such that I could see the keystrokes, and the add-ins are probably password-protected. Now what?
 
Upvote 0
You're out of luck. Exporting and reading the modules is the only way to access them. Even that is far from foolproof since you could have multiple workbooks loaded that use the same key combo, and the last one opened is going to override the others.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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