Google Exceltip.com
Account Icon
Shopping Cart
CheckOut

» Adding a Custom Keyboard Shortcut

To add a custom keyboard shortcut, add, save and store a VBA code line.

It is recommended that general custom keyboard shortcuts be saved in the Personal Macro Workbook. This workbook is created the first time you record and store a macro, and remains hidden when Excel is opened.

To create the Personal Macro Workbook while storing a new keyboard shortcut:

1. From the Tools menu, select Macro, and then Record New Macro.
2. In the Macro name box, insert a name for the macro (no spaces are allowed between characters).
3. In the Shortcut key box, press Shift+ V.
4. Choose Personal Macro Workbook from the Store macro in dropdown list, and click OK.
5. Record anything you like and then stop recording by pressing the Stop Recording icon.
6. Open the VBE (Visual Basic Editor) by pressing Alt+F11.
7. Double-click Module1 under VBAProject (PERSONAL.XLS).
8. In the PasteValues macro, replace the lines recorded with:
Selection.Formula = Selection.Value
This code converts a selected cell's formula to its current value.
9. Click Save.
10. Press Alt+F4 to close and then reopen Excel.
11. To determine if PERSONAL.XLS is open, select Unhide from the Windows menu.
12. To check the keyboard shortcut, select cells containing formulas, and press Ctrl+Shift+V.
Screenshot // Adding a Custom Keyboard Shortcut

Adding a Custom Keyboard ShortcutAdding a Custom Keyboard ShortcutAdding a Custom Keyboard Shortcut

Rate this tip
12 34 5
  RATING: 3.27
  VIEWS: 48829
  No comments have been submitted.


REGISTERED USERS click here to post comments


GUESTSclick here to Register
Name
Comment Title
Comments


Terms and Conditions of use
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Copyright © 2003 ExcelTip.com
Microsoft, Microsoft Excel is a U.S. registered trademark of Microsoft Corporation