Skip to main content

Adding a Macro on the Quick Access toolbar

You can assign a macro to a button in Excel’s Quick Access toolbar. The Quick Access Toolbar sits either above or below the Ribbon. You can add a custom button that will run your macro by following these steps:

  1. Right-click any Ribbon control, and select Customize Quick Access Toolbar.
  2. Click the Quick Access Toolbar button on the left of the Excel Options dialog box.
  3. Select Macros from the Choose Commands From drop-down list on the left.
  4. Select which workbook you want to add, in this example we choose HelloWorld.xlsm from the Customize Quick Access Toolbar drop-down list on the right. If you specify a specific workbook, the macro button can only be displayed in the workbook you specify.
  5. Select the macro you want to add. In this example, we choose Helloworld macro.
  6. Click the Add button.
  7. Select the macro we just added and click the Modify button to change the icon.
  8. Pick a symbol and click OK button to complete modify icon.
  9. Click OK button to save your modify.
  10. Now, your will find the button in Excel’s Quick Access toolbar.
  11. Finally, please don't forget to save your workbook.

Now, you can run your macro by clicking the macro button we just added.

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>