I don't believe it's available as a regular shortcut, but I've add this code to my personal.xls and assigned the ctrl-Q as a shortcut to the macro.
On Error GoTo Errorhandler
Dim Test As String
Test = Selection.Address
Select Case Err.Number
MsgBox Err.Number & " " & Err.Description
Things to remember:
Since this is a macro, you will NOT be able to undo any pastes.
On occasion, it doesn't work(Not very often though), and it's never been a big enough problem for me to research why.
I remember your code for that. Can you post a link to it for me? I always wanted to add it to my snippets.
To add a personal macro workbook(This is a workbook that opens in the background everytime you open excel, Great place to store generic macro's) just do this.
1. Right click on your toolbars and add the visual basic toolbar.
2. Press the red button to record.
3. In the dialog, change the store macro in: to
personal macro workbook.
4. Press OK.
5. Stop the macro.
This causes excel to create a personal macro workbook for you.
If you press Alt-F11 to open the vbe, you should see it in the project explorer.
6. Using the project explorer, add a new module.
7. Paste the code to this module.
8. Close the vbe and close excel, you should be prompted to save the personal macro workbook, make sure you click OK.
9. Open excel and click on the run macro button.
10. select the macro from you list(Should only have one)
11. Click on options.
12. Select your shortcut key here, and OK out of the dialog.
1. Is there a way to undo the whole activity? Just in case I screw up, I must know how to get out of it and restore status quo.
2. Will this feature work on every spreadsheet I work on(old and new)?
3. I work on lots of spreadsheets with macros built on them (I didn't write those). Will this code ever cause any "conflicts" with those macros?
4. Is this the same code that firefytr mentioned?