How to list all current key bindings?

jjasmith4

Board Regular
Joined
Aug 22, 2018
Messages
52
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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Akuini

Well-known Member
Joined
Feb 1, 2016
Messages
2,963
Office Version
  1. 365
Platform
  1. Windows
I haven't tried it myself but maybe this could help:
 
Solution

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,696
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
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.
 

jjasmith4

Board Regular
Joined
Aug 22, 2018
Messages
52
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?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,696
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,569
Messages
5,637,099
Members
416,957
Latest member
Brovashift

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
Top