What keyboard shortcuts are assigned?

%3CLINGO-SUB%20id%3D%22lingo-sub-1504917%22%20slang%3D%22en-US%22%3EWhat%20keyboard%20shortcuts%20are%20assigned%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1504917%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPulling%20my%20hair%20out%20here.%20Hope%20someone%20can%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20recently%20upgraded%20computer%2C%20OS%20and%20Excel%20versions%20(Win10%2C%20Excel%20365%20(1902)).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20try%20to%20run%20one%20of%20my%20personal%20macros%20that%20has%20a%20keyboard%20shortcut%20it%20doesn't%20work.%20A%20couple%20of%20mins%20of%20Googling%20shows%20there%20are%20now%20new%20kb%20shortcuts%20in%20Excel%20and%20that%20I'll%20have%20to%20change%20the%20one%20I%20had%20assigned%20(Ctrl%2BQ).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOk%2C%20so%20I%20assign%20it%20to%20Ctrl%2BShift%2BQ%20and%20when%20I%20run%20that%26nbsp%3B%3CEM%3Esomething%20happens%3C%2FEM%3E%20but%20not%20my%20macro.%20So%20what%20does%20that%20mean%20...%20is%20it%20assigned%20to%20something%20else%20already%3F%20Not%20according%20to%20anything%20I%20can%20find%20online.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20the%20question%20is%2C%20%3CSTRONG%3Eis%20there%20anywhere%20I%20can%20see%20what%20shortcuts%20(including%20customised%20ones)%20are%20assigned%20in%20Excel%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20looks%20like%20I%20can%20(try%20to)%20assign%26nbsp%3B%3CEM%3Eany%26nbsp%3B%3C%2FEM%3Eshortcut%20under%20Developer%26gt%3BMacros%26gt%3BOptions%20-%20for%20example%2C%20Ctrl%20a%20-%20even%20though%20it's%20assigned%20to%20something%20else.%20So%20how%20do%20I%20know%20what%20shortcut%20to%20assign%20to%20my%20macro%20if%20I%20can't%20see%20a%20list%20of%20what's%20already%20assigned%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1504917%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hi all,

 

Pulling my hair out here. Hope someone can help.

 

Have recently upgraded computer, OS and Excel versions (Win10, Excel 365 (1902)).

 

When I try to run one of my personal macros that has a keyboard shortcut it doesn't work. A couple of mins of Googling shows there are now new kb shortcuts in Excel and that I'll have to change the one I had assigned (Ctrl+Q).

 

Ok, so I assign it to Ctrl+Shift+Q and when I run that something happens but not my macro. So what does that mean ... is it assigned to something else already? Not according to anything I can find online.

 

So the question is, is there anywhere I can see what shortcuts (including customised ones) are assigned in Excel?

 

It looks like I can (try to) assign any shortcut under Developer>Macros>Options - for example, Ctrl a - even though it's assigned to something else. So how do I know what shortcut to assign to my macro if I can't see a list of what's already assigned?

4 Replies

@StewDay , you can view the macros (Alt-F8) and click on the options button to see what shortcut key has been assigned to each macro:

TheAntony_0-1594005469618.png

 

Thanks @TheAntony. I can do that of course but I have a lot of macros. Is that the only way to go through them? ... and that's only for the ones I've assigned (and as I said earlier they can even be wrongly assigned - eg. Ctrl+a). Is there no way to see ALL assigned shortcuts?

@StewDay , I'm sure there's a way to find out programmatically but that's beyond what I can do. Quick web search showed a few results so maybe there's a solution already out there. Here's a couple that looked promising:

https://answers.microsoft.com/en-us/msoffice/forum/all/how-do-i-find-out-what-keys-my-macros-have-be...

https://www.excelforum.com/excel-programming-vba-macros/1252748-how-do-i-find-out-what-macro-a-parti...

 

Thanks @TheAntony.

 

That put me on the trail to something useful ... excel-vba-to-list-key-bindings-onkey 

 

Still didn't allow me to see ALL keyboard shortcuts ... looks like those like Ctrl+x are called OnKey bindings and I didn't work out how to see them.

 

But there was a reference to using [Add Watch] , a right-click function in the VBA editor to stop any code from executing. After setting that up and using the shortcut Ctrl+Shift+Q I was able to see it was actually assigned to an old macro that had been commented out. So it was running, but there was nothing to run.

 

I've now re-assigned it to the preferred macro and it's working as expected.

 

So now if I want to assign a new kb shortcut to a macro I first have to check it's not already used by Excel by referring to a list like this one keyboard-shortcuts-in-excel then turn on [Add Watch] to check it's not already assigned to one of my macros!

 

Thanks for making things straight forward Microsoft!