How to Add Macro Buttons to the Excel Ribbon or Quick Access Toolbar

Bottom Line: Learn to add buttons to the Excel ribbon or Quick Access Toolbar that will run macros when you click on them.

Skill Level: Intermediate

Video Tutorial

Watch on YouTube

Macros Are Tools in Your Toolbelt

Macros are simply pieces of code that automate tasks and procedures.  They make things faster and easier and are tools that accomplish specific tasks.  But like any tool, they should be kept near at hand so that they can be used right when you need them.  One way to make your macros more accessible is by storing them in your Personal Macro Workbook and then creating buttons for them, so that they can run with just a simple click.

Creating buttons for macros basically requires you to customize either the Excel Ribbon or the Quick Access Toolbar.  The ribbon is the tabbed menu that is found just above the formula bar.  The Quick Access Toolbar is the line of icons found at the very top of the Excel page.

Excel Diagram Outlining Components..

Again, you will most likely want to store the macros for these buttons in your Personal Macro Workbook because that file opens every time you open Excel. Checkout my post & video on the Personal Macro Workbook if you don't have yours setup yet.

Adding Macro Buttons to the Excel Ribbon

To add a button to the ribbon, start by right-clicking anywhere on the ribbon or ribbon tabs.  Then select Customize the Ribbon.

Customize the Ribbon

This will open the Excel Options page, and Customize Ribbon should already be highlighted on the left-hand side.  In the right-hand side of the Excel Options page, you will see a list of all the tabs that are currently available to you. 

1. Create a New Tab

We will be making a new tab.  To do that, just select the tab that you want your new tab to come after.  Then hit the button that says New Tab.

Customize the Ribbon by creating new tabs and groups

2. Create Groups

Within each tab, you can have subcategories called groups.  You'll be able to place your macro buttons in groups according to their function.  After you've added your new tab and/or group you can change the name of it using the Rename button.

When you choose the Rename option a small window appears allowing you to type in the name of the new tab or group.  In my example, I am naming my new tab “Tool Belt.”

Rename box..

3. Add Macro Buttons

Once you've named both your new tab and the group or groups underneath the new tab, you can start adding buttons that correspond with your existing macros.  To view the macros that are available, select Macros from the drop-down list under Choose commands from.

Select Macros from the dropdown options

Choose the macro that you want to add as a button to your tab.  Then hit Add.  You will see it added to the list on the right.

Click to Enlarge

4. Customizing the Button

Rename the macro so that the file name is not displayed on the button, but whatever title you choose instead.  You can also further customize the button by choosing from the icon menu.  This menu is presented to you when you click the Rename button.

Unfortunately we are limited to this small set of icons. If you want to use a custom image then you will have to create a ribbon by customizing the Ribbon XML. I cover this technique in detail in my VBA Pro Course, which is now part of our Elevate Excel Training Program.

Add custom icon and display name for macro button

And that's it!  The new button has been added to the Tool Belt tab.  It runs the macro called Add 3 Sheets when pressed.  Here's how it looks on the ribbon:

The new macro button has been added to the new tab

Adding Macro Buttons to the Quick Access Toolbar

The process for adding the macro button to the Quick Access Toolbar is essentially the same. However, instead of choosing Customize the Ribbon after right-clicking on the ribbon, choose Customize the Quick Access Toolbar.  This option is highlighted on the menu below.

Menu to customize the Quick Access Toolbar

If you already have a button for the macro that you want to add to the Quick Access Toolbar, you can right-click directly on it.  Then choose Add to Quick Access Toolbar (the first option in the menu shown above).

Export and Import Your Customizations

If you would like to transfer your customized buttons and tabs to another computer or user, you can do so easily.  In the Excel Options window, there is a button on the bottom that says Import/Export.  If you choose Export all customizations, they will be placed in a UI file.  You will be prompted to save this file to your computer.  If you choose the Import customization file option, a browsing window will appear. This will allow you to indicate which file you want to import.

Import or Export Customizations to the Ribbon or Toolbar

Creating a Safety Check for You Macro Buttons

Now that you've created buttons that run your macros, it's important that you don't accidentally hit one of them and inadvertently mess up your worksheet.  To guard against this we can create a Yes/No pop-up box just to verify your intentions before proceeding. 

I hope this information is helpful in allowing you to customize your ribbon or toolbar.  Please let me know if you have any question in the comments below!

  • I have macro sending mail from excel but I don`t know proper code to align outlook message from right.
    this line gives ‘ Argument not optional’

    OutMail. Alignment = Right

    please what is the right code

  • Search
    Generic filters
    Exact matches only


    Learn 10 great Excel techniques that will wow your boss and make your co-workers say, "how did you do that??"
    Plus weekly updates to help you learn Excel.

    Download the eBook

    Join Our Weekly Newsletter

    The Excel Pro Tips Newsletter is packed with tips & techniques to help you master Excel.

    Join Our Free Newsletter

    About Me

    Jon Acampora Profile

    Hello and welcome! My name is Jon Acampora and I'm here to help you learn Excel.

    This blog is updated frequently with Excel and VBA tutorials & tools to help improve your Excel skills and save time with your everyday tasks. Subscribe above to stay updated. More about me...


    Free Excel Training Webinar Modern Power Tools