What keyboard shortcuts are assigned?

Highlighted
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
Highlighted

@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

 

Highlighted
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?
Highlighted

@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...

 

Highlighted

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!