Microsoft Office Tutorials and References
In Depth Information
Assign a Shortcut Key to a Macro
Assign a Shortcut
Key to a Macro
If you have a VBA macro that you use fairly
often, you can quickly access the code by
setting up a shortcut key that runs the macro.
Macros are meant to be timesavers, so it is not
unusual to have a macro that you run several
times each day, or even several times in a row.
In such situations, those mouse clicks can start
to add up and you may begin to wonder
whether the macro is really saving you time.
To work around this problem, you can assign a
shortcut key to a macro. In the section,
“Record a Macro,” you learn that you can
assign a shortcut key when you record an Excel
macro. Fortunately, it is also possible to assign
a shortcut key to a macro later on, either after
you have recorded the macro or after you have
added a macro to a module using the VBA
Editor. In either case, as long as the workbook
containing the macro is currently open, you
can press the shortcut key within Excel to run
the macro.
To ensure that your macro shortcut keys do
not interfere with Excel’s built-in shortcut keys
(see the Tips later in this section), access
Excel’s Help system and locate the Help article
titled “Keyboard shortcuts in Excel 2010.”
1 Open the workbook that
contains the macro.
You can skip step 1 if the
macro is stored in the
Personal Macro
2 Click the View tab.
3 Click Macros.
If you have the Developer
tab displayed, you can
also click the Developer
tab and then click
You can also press
The Macro dialog box
4 Click the Macros In
drop-down arrow and
select the workbook that
contains the macro you
want to run.
If you are not sure which
workbook contains the
macro, select All Open
Workbooks, instead.
Excel displays a list of
macros in the workbook.
5 Click the macro you want
to work with.
6 Click Options.
Search JabSto ::

Custom Search