开发者

Enumerating Assigned ShortCuts in Excel

开发者 https://www.devze.com 2023-04-04 20:07 出处:网络
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 determ

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)

  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.


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消