I want to do a macro for Excel. How do I determine what control key combinations are already spoken for?
You don’t have to assign a shortcut key to a macro if you don’t want to. When I do, I avoid conflicts by making the shortcut CTRL+SHIFT+letter, instead of just CTRL+letter.
You can, though, take a tour through the menus (File, Edit, etc.) and see which ones Excel is using. My install is using CTRL+N, O, S, P, Z, Y, X, C, V, F, H, G, K, and 1. Naturally, the easiest thing to do to check would be try the combination you’re thinking of assigning and see if it does anything.
Personally, for any custom macro for a file, I just insert an object (rectangle, oval, etc.) and assign a macro to it. You can put a text within the box to label the macro.
That way, all you got to do is click the object. And you don;t have to remember the key combination.
You can look up Keyboard Shortcuts in Help.
I’ll copy and paste a few of them from Excel 2003:
Repeat the last action.
F4 or CTRL+Y
Create names (name: A word or string of characters that represents a cell, range of cells, formula, or constant value. Use easy-to-understand names, such as Products, to refer to hard to understand ranges, such as Sales!C20:C30.) from row and column labels.
CTRL+SHIFT+F3
Fill down.
CTRL+D
Fill to the right.
CTRL+R
Define a name.
CTRL+F3
Insert a hyperlink (hyperlink: Colored and underlined text or a graphic that you click to go to a file, a location in a file, a Web page on the World Wide Web, or a Web page on an intranet. Hyperlinks can also go to newsgroups and to Gopher, Telnet, and FTP sites.).
CTRL+K
Enter the date.
CTRL+; (semicolon)
Enter the time.
CTRL+SHIFT+: (colon)
Undo the last action.
CTRL+Z
If you are writing the macro for your own use you can use any combination you choose.
The macro assignment overrides any previous keyboard shortcut (only while that spreadsheet is active)
So any shortcut that you don’t typically use yourself is fair game.
I followed your suggestion. Cool beans!
I have been doing the spreadsheet for the SDMB weekly poker game for years and it just occurred to me that I could automate the process.:smack:
Copy, paste special, copy, paste special, … now just a click on my triangle object labeled “sort macro”.