Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enumerating Assigned ShortCuts in Excel

Tags:

excel

vba

I frequently create new macros in Excel. When assigning the macro to a shortcut key combo it is necessary to try many times before getting one that is not already in use. I want to determine all of the "used" shortcuts either from VBA or any other method available.

like image 263
brad of the near north Avatar asked Nov 14 '22 17:11

brad of the near north


1 Answers

Here's one way (not super convenient but it works)

  1. Export your code module as a .BAS file using File > Export
  2. Open the .BAS file with a text editor
  3. You'll see lines like this:

Attribute f.VB_ProcData.VB_Invoke_Func = "q\n14"

That means that this function is assigned to Ctrl+q.

like image 93
Joel Spolsky Avatar answered Jan 07 '23 06:01

Joel Spolsky