Run a Macro from a Button in Excel – Tutorial

Run a Macro from a Button in Excel

This lesson shows you how to run a macro from a button in Excel.

Steps to Run a Macro from a Button in Excel

Follow the steps below to use a button for a macro.

Step 1: Open File with Macro and Open Developer Ribbon
Developer ribbon
Developer ribbon.

Click the Developer tab.

If you have not done so, open file containing the macro. If you do not have a file with a macro, check out creating a basic macro in Excel.

Step 2: Place Button on Sheet
  1. Click Insert under the Controls group within the Developer ribbon.
  2. Select the Button icon under Form Controls.
  3. Click some where on the sheet.

This will open the Assign Macro dialog box.

Step 3: Select a Macro
Assign Macro dialog box
Assign Macro dialog box.

Select your macro and click OK.

A button should appear on the sheet with sizing nodes, like below.

Sheet showing selected button
Sheet showing selected button.

Note: While the button is selected or in edit mode, you will not be able to click on it.

Step 4: Use Button to Run Macro
Sheet with button to run a macro
Sheet with button to run a macro.
  1. Click some where on the sheet, away from the button. This will unselect the button and take it out of edit mode.
  2. Click on the button to run the macro.

Additional Information

Related Tutorials

Edit a Basic Macro in Excel

Questions and Comments

Contact us at training@techronology.com with any questions or comments.


Tutorials

Techronology Home