How to Add a Macro to Your Quick Access Toolbar in Excel

Get FREE Advanced Excel Exercises with Solutions!

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.

Ways to Add Macro to Quick Access Toolbar in Excel

  • Now, Microsoft Visual Basic for Application box will open.
  • After that, click on Insert >> select Module.

Opening Microsoft Visual Basic for Application Box to Add a Macro to Your Quick Access Toolbar in Excel

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

Opening Macros Box to Add a Macro to Your Quick Access Toolbar in Excel

  • 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:

Using Customize Quick Access Toolbar to Add a Macro to Your Quick Access Toolbarin Excel

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

Opening Excel Options Box to Add a Macro to Your Quick Access Toolbar in Excel

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

Opening Modify Button Box to Add a Macro to Your Quick Access Toolbar in Excel

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

How to Add a Macro to Your Quick Access Toolbar in Excel Using Customize Quick Access Toolbar

  • Finally, the macro will run using the Quick Access Toolbox.

  • Similarly, you can add all the other values in the dataset.

Getting All the Time Values after Adding a Macro to Your Quick Access Toolbar in Excel Using Customize Quick Access Toolbar

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.

Use of File Tab to Add Macro to Quick Access Toolbar in Excel

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

How to Add a Macro to Your Quick Access Toolbar in Excel Using File Tab

  • Finally, the Macro will Run using the Quick Access Toolbox.

  • Similarly, you can add all the other values in the dataset.

Getting All the Time Values after Adding a Macro to Your Quick Access Toolbar in Excel Using File Tab


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.

How to Add a Macro to Your to Excel Ribbon in Excel

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

Opening Rename Box to Add a Macro in Excel

  • 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!


Related Articles

Kawser Ahmed
Kawser Ahmed

Hello! Welcome to my Excel blog! It took me some time to be a fan of Excel. But now I am a die-hard fan of MS Excel. I learn new ways of doing things with Excel and share them here. Not only a how-to guide on Excel, but you will get also topics on Finance, Statistics, Data Analysis, and BI. Stay tuned! You can check out my courses at Udemy: udemy.com/user/exceldemy/

2 Comments
  1. wonderful i’m learning quite a lot thank you so much!!!

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo