
More results...


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
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.

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 .

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 .

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.”

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 .

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.

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 .

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:

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.

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.

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!
You may also like

How to Search Data Validation Drop-down Lists in Excel

Go To Source Cell of XLOOKUP Formula

3 Ways to Fill Down Blank Cells in Excel

VBA Macro to Create Power Query Connections for All Excel Tables
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
A good explanation. Before upgrading to office2010 I wrote an excel VBA macro that when I ran it on each computer, it’s button (with my custom image) was added to the ribbon automatically, the 1st time one ran it. The macro is still working well on office2010, but it doesn’t adding the button to ribbon. How can it be done on office 2010 (automatically by Excel VBA Macro)?
(Actually, The macro is on a shared disk, and different users use it. The first time I install it on one’s computer, the icon was added to the ribbon, so the users only click the button in order to run the macro).
IT’s very simple and most effective explanation i came across for this topic, you are awesome ^-^
I have created custom macro buttons on the ribbon in the past, but now it’s not working. When I add the macro to the new group in Customize Ribbon Screen, the Rename button doesn’t work. And when I right click the new group, it also doesn’t work. I can’t get the icons either. I have a VB kind on icon for the button on the ribbon, but I wanted to customize that. What am I missing? thanks so much.
It is a bit of luck stumbling upon your blog just when I am looking for a Short Cut out of this Microsoft Bug Field. My mortal personal short-cuts has a tendency to pass away the moment I so desperately need them.
Application.OnKey is also perishable. It may work once when I hit a shortcut but refrain the second time. It also abhors Hebrew characters – would announce an error and escape into my error handler.
Thank you for letting me in into this Ribbon Button world. I hope they are more persistent. By the way, can I, depending on circumstance, gray my newly created buttons out.
There anyway to make the button smaller?
Excel Shortcuts List

Learn over 270 Excel keyboard & mouse shortcuts for Windows & Mac.
Join Our Weekly Newsletter
The Excel Pro Tips Newsletter is packed with tips & techniques to help you master Excel.

Session expired
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.
Assign a macro to a button
You can use a button (a form control) to run a macro that performs an action when a user clicks it. For example, you might use a button to automate the printing of a worksheet, the filtering of data, or the calculation of numbers.
After you create a macro , you can assign it to a button you click to run the macro . You can assign a macro to a button on the Quick Access Toolbar or to a button in your own personal group on the ribbon.
If you want a macro button to be available in other workbooks, assign it to a macro that was created in a personal workbook .
Add a macro button to the Quick Access Toolbar
Click File > Options > Quick Access Toolbar .
In the Choose commands from list, click Macros .

Select the macro you want to assign a button to.
Click Add to move the macro to the list of buttons on the Quick Access Toolbar.
To replace the default macro icon with a different button for your macro, click Modify .
Under Symbol , select a button icon for your macro.

To use a friendlier name for the button, in the Display name box, enter the name you want.
You can enter a space in the button name.
Click OK twice.
The new button appears on the Quick Access Toolbar, where you can click it to run the macro.
Tip: When you save the workbook , buttons you assign to macros in the personal workbook will be available in every workbook you open.
Add a macro button to your own group on the ribbon
Click File > Options > Customize Ribbon .
Under Customize the Ribbon , in the Main Tabs list , check the Developer box if it is not already checked.

Pick the tab where you want to add your own group.
For example, pick Home , to add your group to the Home tab.
Select New Group .
That adds New Group (Custom) to the tab you picked.
To use a better name for your new group, click Rename , type the name you want in the Display name box, and then click OK .
You can enter a space in the name. For example, type My Macros .
To add a macro to the group, in the Choose commands from list, click Macros .
Select the macro you want to add to your new group, and then click Add . The macro is added to the My Macros group.
To use a friendlier name, click Rename , and then type the name you want in the Display name box.
You can enter a space in the name.
Your new group appears on the tab you picked, where you can click the button to run the macro.
Newer versions
On the Developer tab, in the Controls group, click Button .
If the Developer tab is not available
Go to Excel > Preferences... > Ribbon & Toolbar .
In the Customize the Ribbon section, under Main Tabs , check the Developer check box, and press OK.
Click the worksheet location where you want the upper-left corner of the button to appear.
In the Assign Macro dialog box, click the name of the macro that you want to assign to the button, and then click OK .
To resize the button, drag the sizing handles.
To specify the control properties of the button, Control+Click or right-click the button, and then click Format Control .
Excel 2011 for Mac
On the Developer tab, in the Forms Control group, click Button .
Under Customize , select the Developer check box.

Need more help?
Want more options.
Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Microsoft 365 subscription benefits

Microsoft 365 training

Microsoft security

Accessibility center
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Ask the Microsoft Community

Microsoft Tech Community

Windows Insiders
Microsoft 365 Insiders
Was this information helpful?
Thank you for your feedback.

How to Assign a Macro to a Button in Excel (Easy Guide)
- -- By Sumit Bansal
While there are many different ways to run a macro in Excel, none of those methods can be as easy and user-friendly as clicking on a button.
And for that to work, you need to assign a macro to a button first.
In this tutorial, I will show you a couple of ways to insert a button in Excel and then assign a macro to that button (or shape). Once done, as soon as a user clicks on the button, the macro VBA code would be executed.
For the purpose of this tutorial, I will be using the below VBA macro code (which simply selects cell A1 in the active sheet and enters the text “Good Morning” in it and colors it red).
The above VBA code is placed in a regular module in the VB Editor

Now let’s dive right in and see how you can assign this macro to a button or shape in Excel!
This Tutorial Covers:
Insert a Shape and Assign Macro to that Shape
While there are dedicated buttons that you can insert in the worksheet and then assign the macro to it, I will first cover how to assign a macro to a shape .
I personally love this method and prefer it over the rest two methods covered later. You can easily insert a shape (square or rectangle) and can make it look like a button.
And since it’s a shape, you can easily format it to look perfect with your existing formatting or brand colors.
Below are the steps to insert a shape in Excel:

- Resize the rectangle and format it (give it a border, color, shade if you want).
After you have done the above steps, you will have a rectangle shape in the worksheet, and now we will assign a macro to this shape.
Now let’s see how to assign a macro to this shape.
- Right-click on the shape on which you want to assign the macro

- In the Assign Macro dialog box, you will see a list of all the macros that you have in the workbook

- Click on OK
That’s it!
The selected macro has now been assigned to the shape.
Now when you hover the cursor over the shape, it will show the hand icon. which indicates that now this shape has become clickable.

And now if you click on the shape, it will run the assigned macro .
You can type any text within the shape to make it more intuitive (such as ‘Click here to run the macro’). To do this. right-click on the shape and then click on Edit Text. Now you can type within the text box shape.

Note that you won’t be able to click and run the macro when the shape has been selected (i.e., you see a border around the shape that appears when you select it), To make it clickable, hit the Escape key or click anywhere in the worksheet.
Also, when you have assigned the macro to the shape already, you will not be able to select it by using the left mouse key (as it has become clickable and left-click would now execute the macro). In that case, select the shape, hold the control key and then press the left key.
Keeping Shape Visible When you Hide/Resize Rows/Columns
In Excel. when you insert a shape, it sits over the cells – like a chart/object.
This also has a drawback that when you resize or hide rows/columns that have the shape over it, the shape also follows suit.
In the below example, the shape gets hidden when I hide the column on which it’s placed.
If you don’t want this to happen, follow the below steps:
- Right-click on the shape

- In the Format Shape pane (or dialog box in case you’re using Excel 2010 or prior versions), select Size and Properties

- Close the pane (or dialog box)
Now, when you resize rows/columns or hide these, the shape would stay in its place.
Assign a Macro to Form Control Button
If you’re not too concerned with the formatting of the button and are ok with regular gray buttons, you can quickly insert it from form control (or ActiveX control as shown next) and then assign a macro to it.
For this to work, you will need to have the Developer tab in your ribbon. If you don’t have it, here is a detailed step-by-step tutorial on getting the developer tab in the Excel ribbon .
Once you have the developer tab visible, you can use the below steps to quickly insert a button and assign a macro to it:

- Click anywhere on the worksheet. This will insert the button wherever you click and automatically open the ‘Assign Macro’ dialog box.
The above steps would insert a button that has the specified macro assigned to it.
By default, it would be a small button with text such as ‘Button’ written on it. You can change the text to whatever you want and can also change the shape of the button (by dragging the edges).
Since this is an object that is placed over the worksheet (just like shapes/charts), you can drag and place it anywhere in the worksheet.
One drawback of using the Form Control button is that you don’t have much control over the formatting. For example, you can not change the color from gray to something else.
Although there is a little bit of formatting that you can do with a Form control button, it’s nowhere close to what you can do with shapes.
You get these button formatting options when you right-click on the button and then click on Format Control.

This will open the Format Control dialog box where you can change the font type/color, size, alignment, etc.

One good thing about this button is that it doesn’t hide or resize when you hide the rows/columns or resize them. It would, however, move in case you change the height or width or the row/column over which the button is placed.
In case you don’t want the button to stay in its place, you can change the setting by following the below steps:
- Right-click on the button
- Click on Format Control
- Click on the Properties tab


Assign a Macro to an ActiveX Control Button
Apart from the Form Control button, there is also an ActiveX control button to which you can assign a macro.
In most cases, you won’t need to use the ActiveX control button, and I recommend you use it only when you completely understand what it is and you know what you’re doing.
This also, sometimes, make ActiveX a bit glitchy and unpredictable. So, while I cover it in this tutorial, I don’t recommend using ActiveX button and assign a macro to it.
To insert an ActiveX button and then assign a macro to it, follow the below steps:
- Click on the Developer tab
- In the Control group, click on Insert.

- Click anywhere on the worksheet. This will insert the button wherever you click.
- Double-click on the button and it will open the VB Editor backend where you can place the code for the ActiveX button
With ActiveX control, you get a lot more flexibility with a single button. For example, you can specify one macro to be run when you simply click on the button once and another macro when you double-click or even another one when you use the up/down arrow key.
Again, not something you need to be using in your regular work.
Hope you found this tutorial useful. If you’re interested in learning VBA, you can check out more in-depth Excel VBA tutorials here .
You may also like the following Excel tutorials:
- How to Record a Macro in Excel
- Creating a User Defined Function (UDF) in Excel VBA
- Excel VBA MsgBox [Message Box]
- Useful Excel Macro Examples for VBA Beginners
- How to Remove Macros From an Excel Workbook
- How to Enable Macros in Excel?

FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
1 thought on “how to assign a macro to a button in excel (easy guide)”.
Following the procedure here, I cannot assign a Macros from an *.xlam workbook (addin). Is there a way to do this? thx
Comments are closed.
BEST EXCEL TUTORIALS
Best Excel Shortcuts
Conditional Formatting
Creating a Pivot Table
Excel Tables
INDEX- MATCH Combo
Creating a Drop Down List
Recording a Macro
© TrumpExcel.com – Free Online Excel Training

Privacy Policy | Sitemap

Add a Button and Assign a Macro in Excel
Excel buttons.
In Excel, Buttons are used to call Macros. This tutorial will cover how to create Excel buttons, assign Macros to them, adjust their properties, and more.
By default, Excel macros are accessible in a list via the “Macros” button on the View ribbon.

Often though, you’ll want to provide easy access to a particular macro directly on your worksheet. This can be achieved using a Button control.
A Button control looks like a Microsoft Windows button, and runs a macro when clicked. It’s a much handier way to access your most commonly used macros, and is an easy way to expose custom functionality to other users of your workbook.
Run a Macro From a Button
To run a Macro from a button in Excel, simply click the button:
The Excel Developer Tab
Buttons are accessible via the Developer Tab.

Unfortunately, Excel hides the Developer tab by default. If you don’t see the Developer Ribbon, follow these steps:
- Click File > Options in the list on the left-hand border

- In the Options dialog select C ustomize Ribbon > Customize the Ribbon > Main Tabs and add a check-mark in the box for “Developer”, and click OK .

Add a Macro Button
In Excel, select the Developer tab, then click on the “ Insert ” dropdown in the Controls section. There are several types of controls divided into two sections, “Form Controls” and “ActiveX Controls”.

For now, just click on the Button control under “ Form Controls ”. Next, move the mouse anywhere over the worksheet surface, then hold left-click and drag the mouse to draw the outline of a rectangle. When you release left-click, a new dialog will appear titled “ Assign Macro ”.
Assigning a Macro to a Button

Here you can assign an existing Macro to the button, record a new macro, create a new macro from scratch using VBA, or click “Cancel” and return to your button later.
Assign Existing Macro to a Button
To assign an existing Macro, you simply select the macro’s name in the list, then click OK.
Edit an Existing Macro Before Assigning to a Button
To edit a macro before assigning it to the button, select the macro’s name in the list and click the “Edit” button (the “New” button text changes to “Edit”).

Record a Macro and Assign to Button

Write VBA Procedure and Assign to Button
To write a new macro for the button, type a new name for your macro in the textbox at the top of the dialog, then click “New”. Excel will bring up the VB Editor, in which you’ll see a new empty macro procedure with the name you entered. This procedure will be stored in a new module, visible in the Project window.

Change Macro Assigned to Button
To change the Macro that’s assigned to a button, simply right-click the button and select Assign Macro :

Here you can see the assigned Macro and make any desired changes.

How to Adjust Button Properties in Excel
Move or resize excel button.
After you’ve placed a button, you can easily move or resize it. To perform any of these actions, right-click on the button. Then you can left-click and drag the button to your desired location or resize it.

Rename Button
With the button selected, left-click on the button text to edit.
To add multiple lines, simple press the ENTER key.

Format Button
To format other button properties, Right-Click > Format Control

Here you can adjust font sizes, and many other button properties:

Of particular note is the “Properties” tab, which changes how the button behaves as surrounding rows and columns are inserted, deleted, resized, or hidden/unhidden.

- Move and size with cells : The button will move and resize when rows and columns are changed.
- Move but don’t size with cells : The button will move, but not resize.
- Don’t move or size with cells : The button will not move or resize.
- Finally, Print Object can set the object to appear on printouts. This is unchecked by default, but can be toggled on if desired.
Assign a Macro to a Shape
Besides buttons, macros can assigned to other objects like Pictures, Textboxes, and Shapes. With a Picture or Shape, you can make a button that looks any way you like. Excel includes a wide variety of customizable Shapes including polygons, arrows, banners, and more that may be better suited to your worksheet than a regular button control.
Shapes are accessed from the Insert tab:

Select the shape you want from the Shape dropdown, draw it onto your worksheet as you would a button control, then right-click it and select “Assign Macro…” from the pop-up dialog. The options are the same as assigning a macro to a button.

Assign a Macro to a Hyperlink
Macros can also be assigned to hyperlinks by using VBA Events . Events are procedures that are triggered when certain actions are performed:
- Open/Close/Save Workbook
- Activate / Deactivate Worksheet
- Cell Values Change
- Click Hyperlink
Events require knowledge of VBA. To learn more about events, visit our VBA Tutorial .

Ultimate VBA Add-in
Offer expires soon!
Sale Ends Friday at Midnight
VBA (Macros) Code Examples Add-in

- Stack Overflow Public questions & answers
- Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
- Talent Build your employer brand
- Advertising Reach developers & technologists worldwide
- About the company
Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Customizing a ribbon with VBA in Excel
I've already learned that creating a custom tab is in Excel not possible in this ! post (unlike i.e. MSProject)
Specifically, can I change the paths of the macros to the current location ?
Edit It seems that this page may lead to the answer, but I still don't know how, though
Some more in-detail description of the situation:
The user will download a file, which contains a list of materials, equipment, labor. Each column contains information about quantities, pricing etc When the user click on this button I want to create (I have created manually), a macro called 'Main' in another workbook launches and copies the whole sheet (the contents) to itself and performs some things that procedures do, on it.
So the problem I'm facing, is twhen I'm sending a new version to the client, he has to put it in the exact location or it won't work. Since there's a mix of Mac and Windows computers involved, I'd rather see a situation where the button is assigned to the procedure when the user opens WorkBook B (the one that contains the code).
This way, a new version has to be openened only once, and then for continuous use, the user can just open the downloaded file, click the appropriate button and WorkBook B will open itself and execute.
Maybe there's other ways to go about this. I haven't checked if it's not easier to assign a button to the quick access toolbar...
- 1 What does "paths of the macros" mean? – Mathieu Guindon Aug 29, 2013 at 22:44
- The icons/buttons in the Ribbon point to the macro in the excel-file at the location/path when I've assigned them, but when the user opens the same file from another directory (i.e. Downloads) and tries to run the macros with the button, it is still pointing to that previous file, hence the path of the macros. I guess there is a much better way to explain this :) – oneindelijk Sep 2, 2013 at 21:13
- Wouldn't it be simpler to be grouping them in an add-in then? – Mathieu Guindon Sep 2, 2013 at 21:17
- Hi, retailcoder, would (or could) an add-in be embedded in the particular excel file ? (It's an xlsm) – oneindelijk Sep 3, 2013 at 14:59
This is some code I use to add a custom toolbar:
The 'OnAction' controls the macro that runs... If you wanted to expand that to run a macro on a specific workbook, use "whatever.xls!MacroName"

- ... or use "'" & thisworkbook.name & "'!MacroName" maybe? (That's a single quote inside double quotes.... then single quote before exclamation) – Simon Aug 30, 2013 at 0:32
- 3 While this works in Excel 2007+, the CommandBars do not really customize the Ribbon per se. To Truly customize the ribbon, it's necessary to modify the workbook's XML with the CustomUI XML editor. – David Zemens Aug 30, 2013 at 1:23
Your Answer
Sign up or log in, post as a guest.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy
Not the answer you're looking for? Browse other questions tagged vba excel ribbon or ask your own question .
- The Overflow Blog
- How Intuit democratizes AI development across teams through reusability sponsored post
- The nature of simulating nature: A Q&A with IBM Quantum researcher Dr. Jamie...
- Featured on Meta
- We've added a "Necessary cookies only" option to the cookie consent popup
- Launching the CI/CD and R Collectives and community editing features for...
- Staging Ground Beta 1 Recap, and Reviewers needed for Beta 2
- The [amazon] tag is being burninated
- Temporary policy: ChatGPT is banned
Hot Network Questions
- A-Z related to countries
- Mathematica not solving this integral
- What is the purpose of this D-shaped ring at the base of the tongue on my hiking boots?
- MAGENTO 2: PHP Parse error: syntax error, unexpected 'MageSuite' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) ... on line 7
- Are immutable variables part of the contract storage?
- Why does Grover's algorithm behaves so different for different solution addresses?
- Nought and Crosses (tic-tac-toe) in C++
- Getting timestamp of each time pings enter and leave a radius
- The region and polygon don't match. Is it a bug?
- Why is this sentence from The Great Gatsby grammatical?
- Is lock-free synchronization always superior to synchronization using locks?
- Why are physically impossible and logically impossible concepts considered separate in terms of probability?
- Is it possible to create a concave light?
- Why does Jesus turn to the Father to forgive in Luke 23:34?
- How many "grounds" are there and what is the difference?
- Mini project #2: Guessing a number loop
- Draw Parcly Taxel's cutie mark
- Why do many companies reject expired SSL certificates as bugs in bug bounties?
- Atheists who follow the teachings of Jesus
- Spacing in tuplets (in sheet-music)
- Why are trials on "Law & Order" in the New York Supreme Court?
- Do you really get double penalized for rolling HSA excess contributions to the next year?
- If you preorder a special airline meal (e.g. vegan) just to try it, does this inconvenience the caterers and staff?
- Is there a proper earth ground point in this switch box?
Your privacy
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .
Article Categories
Book categories, collections.
- Technology Articles
- Software Articles
- Microsoft Products Articles
- Excel Articles
How to Assign Macros to the Ribbon and the Quick Access Toolbar in Excel 2013
Excel 2013 for dummies.

Sign up for the Dummies Beta Program to try Dummies' newest way to learn.
You can assign a macro to a custom tab on the Ribbon or a custom button on the Quick Access toolbar in Excel 2013 and then run it by clicking that custom button.
To assign a macro to a custom group on a custom Ribbon tab, you follow these steps:
Choose File→Options and then click the Customize Ribbon tab in the Excel Options dialog box (or press Alt+FTC).
Excel displays the Customize Ribbon pane in the Excel Options dialog box.
Click Macros in the Choose Commands From drop-down list box on the left.
Excel lists the names of all the macros created in the current workbook in the Choose Commands From list box.
Click the name of the custom group on the custom tab to which you want to add the macro in the Main Tabs list box on the right.
If you haven’t already created a custom tab and group for the macro or need to create a new one, follow these steps:
Click the New Tab button at the bottom of the Main Tabs list.
Excel adds both a New Tab (Custom) and New Group (Custom) item to the Main Tabs list while at the same time selecting the New Group (Custom) item.
Click the New Tab (Custom) item you just added to the Main Tabs.
Click the Rename button at the bottom of the Main Tabs list box and then type a display name for the new custom tab before you click OK.
Click the New Group (Custom) item right below the custom tab you just renamed.
Click the Rename button and then type a display name for the new custom group before you click OK.
In the Choose Commands From list box on the left, click the name of the macro you want to add to the custom group now selected in the Main Tabs list box on the right.
Click the Add button to add the selected macro to the selected custom group on your custom tab and then click the OK button to close the Excel Options dialog box.
After you add a macro to the custom group of a custom tab, the name of the macro appears on a button sporting a generic icon (a programming diagram chart) on the custom tab of the Ribbon. Then, all you have to do to run the macro is click this command button.
To assign a macro to a custom button on the Quick Access toolbar, follow these steps:
Click the Customize Quick Access Toolbar button at the end of the Quick Access toolbar and then click More Commands on its drop-down menu.
Excel opens the Excel Options dialog box with the Quick Access Toolbar tab selected.
Click Macros in the Choose Commands From drop-down list box.
Click the name of the macro to add to a custom button on the Quick Access toolbar in the Choose Commands From list box and then click the Add button.
Click OK to close the Excel Options dialog box.
After you close the Excel Options dialog box, a custom button sporting a generic macro icon appears on the Quick Access toolbar. You can choose a different icon by clicking the Rename button below the Customize the Ribbon box. To see the name of the macro assigned to this custom macro button as a ScreenTip, position the mouse pointer over the button. To run the macro, click the button.
About This Article
This article is from the book:.
- Excel 2013 For Dummies ,
About the book author:
Greg Harvey, PhD, is President of Mind Over Media, an online media company. He has written all editions of Excel For Dummies, Excel All-in-One For Dummies, and Excel Workbook For Dummies. Greg is an experienced educator with a wide variety of interests.
This article can be found in the category:
- Excel 2013 For Dummies Cheat Sheet
- How to Move Embedded Charts to Chart Sheets in Excel 2013
- How to Place WordArt in an Excel 2013 Worksheet
- How to Sort Data Lists on Multiple Fields in Excel 2013
- How to Use Ready-Made Number Filters in Excel 2013
- View All Articles From Book

IMAGES
VIDEO
COMMENTS
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. This will open the Excel Options page, and Customize Ribbon should already be highlighted on the left-hand side.
Add a macro button to the Quick Access Toolbar Click File > Options > Quick Access Toolbar. In the Choose commands from list, click Macros. Select the macro you want to assign a button to. Click Add to move the macro to the list of buttons on the Quick Access Toolbar.
Add a macro button to the Quick Access Toolbar Click File > Options > Quick Access Toolbar. In the Choose commands from list, click Macros. Select the macro you want to assign a button to. Click Add to move the macro to the list of buttons on the Quick Access Toolbar.
To insert an ActiveX button and then assign a macro to it, follow the below steps: Click on the Developer tab In the Control group, click on Insert. In the options that appear, in the ActiveX Controls options, click on the Command Button option. Click anywhere on the worksheet. This will insert the button wherever you click.
In the Options dialog select Customize Ribbon > Customize the Ribbon > Main Tabs and add a check-mark in the box for “Developer”, and click OK. Add a Macro Button In Excel, select the Developer tab, then click on the “ Insert ” dropdown in the Controls section.
The icons/buttons in the Ribbon point to the macro in the excel-file at the location/path when I've assigned them, but when the user opens the same file from another directory (i.e. Downloads) and tries to run the macros with the button, it is still pointing to that previous file, hence the path of the macros.
To assign a macro to a custom group on a custom Ribbon tab, you follow these steps: Choose File→Options and then click the Customize Ribbon tab in the Excel Options dialog box (or press Alt+FTC). Excel displays the Customize Ribbon pane in the Excel Options dialog box. Click Macros in the Choose Commands From drop-down list box on the left.
Make a custom macro button on the Ribbon Menu in Excel.Excel Quickie 39: https://www.youtube.com/watch?v=KpqKmH3a-osHow to Make a Personal Macro Workbook: ht...