Looking for ways to add a macro to your quick access toolbar in Excel? Then, this is the right place for you. You can run a macro from the Developer tab. However, adding a macro to your quick access toolbar will make your work easier. Here, you will find 2 step-by-step explained ways to add a macro to your quick access toolbar in Excel.
Download Practice Workbook
2 Ways to Add Macro to Quick Access Toolbar in Excel
Suppose you have a dataset containing the Names of some employees. Now, you want to add the current time as their Entry and Exit Time using a macro in Excel. Follow the steps given below to add the macro and run it from the Developer tab.
Steps:
- Firstly, go to the Developer tab >> click on Visual Basic.
- Now, Microsoft Visual Basic for Application box will open.
- After that, click on Insert >> select Module.
- Then, write the following code in your Module.
Code Breakdown
- Firstly, we created a Sub Procedure as TimeStamp().
- Then, we inserted the NOW Function as a formula in the Active Cell.
- After that, we selected and copied the Active Cell.
- Next, we used the PasteSpecial method and set x1None as Operation, SkipBlanks as False, and Transpose as FALSE.
- Then, we set the CutCopyMode as False.
- Finally, we autofitted the columns.
- Next, click on the Save button and go back to your worksheet.
- Now, select Cell C5.
- Then, go to the Developer tab >> click on Macros.
- Now, the Macros box will open.
- After that, select TimeStamp.
- Then, click on Run.
- Finally, you will get the current time using Macro from the Developer tab.
However, you can also add this macro in your Quick Access Toolbar in 2 different ways. Those ways are given below.
1. Using Customize Quick Access Toolbar in Excel
In the first method, we will show you how to add a macro to Quick Access Toolbar using the Customize Quick Access Toolbar in Excel.
Steps:
- In the beginning, click on the Show Ribbon button shown in the image below.
- Then, click on Show Quick Access Toolbar.
- After that, click on the Customize Quick Access Toolbar drop down button.
- Next, click on More Commands.
- Now, the Excel Options box will appear.
- After that, select Macros from the drop-down list on the left.
- Then, at the top of the list on the right, choose For All Documents, or For xxx (where xxx is the active workbook’s name). This step determines whether the macro will be available for all workbooks, or just the workbook that contains the macro.
- Next, select your macro and click the Add button. Here, we will select the TimeStamp macro.
- Now, to change the icon or displayed text, click the Modify button.
- Next, the Modify Button box will appear.
- Then, type a name as Display name. Here, we will type Timestamp.
- After that, select any Symbol.
- Finally, click on OK.
- Then, click on OK.
- After that, select the Cell where you want to insert the current time.
- Next, click on TimeStamp to run the macro from your Quick Access Toolbar.
- Finally, the macro will run using the Quick Access Toolbox.
- Similarly, you can add all the other values in the dataset.
Read More: How to Add the Fill Color Icon to the Quick Access Toolbar in Excel
2. Use of File Tab to Add Macro to Quick Access Toolbar in Excel
Now, we will show you how to add a macro to the Quick Access Toolbar from the File Tab.
Here are the steps.
Steps:
- Firstly, go to the File tab.
- Then, click on Options.
- Now, the Excel Options box will open.
- Next, go to the Quick Access Toolbar tab.
- Then, go through the steps shown in Method1 to add your macro in the Quick Access Toolbar.
- After that, select the Cell where you want to insert the current time.
- Next, click on TimeStamp to run the macro from your Quick Access Toolbar.
- Finally, the Macro will Run using the Quick Access Toolbox.
- Similarly, you can add all the other values in the dataset.
Adding Macro to Excel Ribbon in Excel
Additionally, here, we will show you how you can add a macro to the Excel Ribbon in Excel. Go through the steps given below to do it on your own.
Steps:
- Firstly, Right-click on the Excel Ribbon.
- Now, the Excel Options box will appear.
- Then, click on New Tab.
- Afterward, select the New Tab and click on Rename.
- Next, the Rename box will appear.
- After that, Type Time Stamp as Display name.
- Then, click on OK.
- Afterward, click on New Group.
- Now, select TimeStamp macro and click on Add.
- Next, click on New Group.
- Then, click on Rename.
- Again, the Rename box will open.
- Then, type TimeStamp as Display name and choose a Symbol.
- Finally, click on OK.
- Again, click on OK.
- Now, select the Cell where you want to insert the current time.
- Next, go to the Time Stamp tab >> click on TimeStamp to run the macro.
- Finally, the Macro will Run using Excel Ribbon.
- Similarly, you can add all the other values in the dataset.
Conclusion
So, in this article, we have shown you ways to add a macro to your quick access toolbar in Excel. I hope you found this article interesting and helpful. If something seems difficult to understand, please leave a comment. Please let us know if there are any more alternatives that we may have missed. And, visit ExcelDemy for many more articles like this. Thank you!
wonderful i’m learning quite a lot thank you so much!!!
Thank you, Jaypogi!