Skip's directions are correct IF you want to assign "VBA code" to Control A.
However, because you mention "command", I suspect you "might" be referring to one of the Excel menu commands - and you want to set up a "hot key" for activating such a command.
If THIS is the case, then here are the steps:
1) On the "icon section" at the top of the screen, right-click, and then choose "Customize" (at the bottom of the pulldown).
2) In the "Commands" window, click on the "Commands" Tab.
3) Click on the "Category" under which you expect to locate the particular "command" you wish to add to the "toolbar icons" at the top of the screen.
4) If there is not sufficient room on the existing Toolbars, you can add a new "Custom" Toolbar. You click on the "Toolbar" Tab, then click "New" (on the right). This will create a new "Custom" Toolbar - that you can then "drag" to the position you prefer at the top of the screen.
5) Then you can add various "command" icons to that new Toolbar.
6) After you have added a new command icon to a Toolbar, you can modify it so that it can be "activated with a Hot Key". However, in this case, you don't use the <Control> key and a letter; instead you use the <Alt> key and a letter.
7) To set this up such a "Hotkey" (the using of <Alt> plus the letter), you must follow these steps:
7a) While the "Customize" window is STILL present on the screen, right-click on one of the new icons you have added, and choose "Test Only (Always)".
7b) Right-click on the icon (now text), and on the pulldown menu, click on the icon Name (3rd from the top).
7c) Edit that name to suit your wishes, in terms of: i) the "length" of the text (i.e. abbreviations take up less space), and ii) placement of the "&" character before the letter that you want to use to activate the icon (by holding down the <Alt> key and hitting that letter).
IMPORTANT POINTS:
1) There are SEVERAL commands that can be MUCH more easily activated by using the "Hot Key" method. (If you could only see MY Excel screen !!!)
2) The use of these "Hot Keys" can DRAMATICALLY increase one's EFFICIENCY in performing various common tasks that would otherwise take CONSIDERABLY LONGER using the MOUSE method.
I hope this helps. Please advise as to how you make out. And of course, I'm anxious for you to confirm "which task" it is that you're aiming to achieve.
After Step #3... After Clicking on a "Categories" (on the left side of the "Customize" window, scroll down the "Commands" (right side of the "Customize" window), until you find the command you are searching for, or find one you weren't searching for, but decide would be useful to include on your Toolbar). Then, simply click-and-drag that icon to your Toolbar.
I have used both features as i was designing an add-in for myself to help with some of the everyday things i do. Such as open up 4 workbooks then update pivot tables on each as one hot key command
Adam
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.