HomeMicrosoft OfficeExcelHow to Add a Macro to the Toolbar in Excel?

How to Add a Macro to the Toolbar in Excel?

In this post, you’ll learn about macros in Microsoft Excel and how you can add a macro to the toolbar in Excel workbook.

Add a Macro to the Toolbar

When you frequently use an Excel macro, you can add it to the Quick Access Toolbar. Hence, you can quickly access your macro.

For this you need to record an empty macro first.

  • Under the Developer tab, click Record Macro.
  • Name the macro as ‘Macro_For_Toolbar’.
  • Click OK.
  • Click Stop Recording.
  • Open the Visual Basic Editor.

Enter the following code in the module

Sub Macro_For_Toolbar' ()

Activecell.value = "developerpublish"

End sub
  • This macro places your name in the Active Cell.
  • Click save and then run it.
  • Now we can add this macro to the Quick Access Toolbar.
  • Click the down arrow on the top left of your screen and click More Commands.
How to Add a Macro to the Toolbar in Excel?
  • In Choose commands, select Macros.
  • Select the macro and click Add.
How to Add a Macro to the Toolbar in Excel?
  • You can modify the button that will be added to the Quick Access Toolbar by clicking on Modify.
  • Click OK .
How to Add a Macro to the Toolbar in Excel?
  • You can now execute the macro.
  • To check whether the program works, select a cell and click on the button added to the Quick Access Toolbar.
How to Add a Macro to the Toolbar in Excel?

When you close Excel, Excel prompts you to save the changes you made to the Personal Macro Workbook.

Click Save to store this macro in a hidden workbook that opens automatically when Excel starts.

So that the macro will be available to all your workbooks.

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this article, you will learn about the SKEW.P function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the SKEW function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the RANK.EQ function, the formula syntax and usage of the function in Microsoft...
  • Excel
  • November 23, 2021