How to link or assign a recorded macro to a command button in Excel

Advantages of assigning a macro to a button in Excel

Macros became one indispensable tool for those who create statistics, calculation tables, those who carry inventories of large establishments or need to create an Excel sheet to calculate rental prices.

This current fame has led some developers to create macros and share them, which in turn allows other users to download and obtain them.

Macros become a necessity when it comes to working quickly, because they will bring productivity to the max, we can apply macros to any spreadsheet. They are similar to the best most useful keyboard shortcuts to use in Excel, but not exactly.




Assigning a button is something that gives us a few seconds of time, which generally serves to organize and define what we will do with the cells, but with this it is just a matter of selecting the cells and clicking on this button so that everything is done in a right now.

How to link or assign a recorded macro to a command button in Excel

In turn, you can create a custom progress bar while running a macro in Excel, so there are no leaks along the way.

What do you need to do to assign a recorded macro to a command button in Excel?

If you already have Excel on your computer, you need to start a new spreadsheet and follow these steps:

Check the Developer box

Add the card " Developer "To the options bar, you have to enter the section" Fillet ", Once the item has been identified" options "And click on it, then go to the section" Customize ribbon "And tick the box" Developer ".




Set button

Create the button you want to link the macro to, for this you have to go to the tab " Developer "And look for the section" Controls ", While there you click on" Inserisci "And you have to click on the first small box that says" Button " in the section " Form controls ".

Customize the button to your liking

Give the button the size and position you like best, it can go where you like and have the size you like. It remains in your imagination what you can do with this button.

Assign macros

Immediately after completing the previous step, Excel will ask you to assign a macro for this button, select the macro you want to link and press " OK ".

Define the format

Prevent the button from losing its position and size by assigning a format, to do this, right click on the button and look at the bottom of the list for the option " Control format ".

A menu will appear where you need to locate the option " Property ", Now check the box" Do not move or change the size with cells ", Finish by pressing" OK ”To save the selection.



Give the button a name

Name your button and this will make it easier to select when you are working, this makes it faster and helps you remember which macro this button is associated with.

How to link or assign a recorded macro to a command button in Excel

You have now managed to assign one recorded macro at a button, this works for you in a large number of circumstances, being able to use it in any sheet you create, which gets you to get the job done efficiently and quickly.


This also helps reduce the time it takes to complete a task, because maybe something can take hours and can be done in seconds with one click.

The most time-consuming part is creating the macro and buttons, but the functionality is so extensive that this investment of time generates a certain need for increase the our productivity.

We hope this tutorial will interest you and help you increase the amount of skills you can offer your company or future employers.

add a comment of How to link or assign a recorded macro to a command button in Excel
Comment sent successfully! We will review it in the next few hours.

End of content

No more pages to load