Enumerating Assigned ShortCuts in Excel
I frequently create new macros in Excel. When assigning the macro to a shortcut开发者_JAVA技巧 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.
Here's one way (not super convenient but it works)
- Export your code module as a .BAS file using File > Export
- Open the .BAS file with a text editor
- 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.
We created an add-in that may solve this problem. http://datamules.com/course/shortcuts has a short tutorial on shortcuts, but the "Shortcuts Extras" link has an add-in for Excel 2007+ that let's you type in a key and see what the key-sequence is assigned to.
Hope that helps!
精彩评论