Macros are user created programs (written or recorded) which are used to automate repeated & complex tasks in Excel. Macros feature is available in various Microsoft Office Applications.
Macros can be stored within the Excel file with .xlsm extension. Macros are not allowed to store inside an Excel .xlsx extension file because of security reasons.
Macros are written in VBA (Visual Basic for Applications). VBA (Visual Basic for Applications) is language similar to Microsoft Visual Basic programming language and VB Script language.
To add a Macro to Excel Quick Access Toolbar (QAT), follow these steps.
Step 1 : Click "Customize Quick Access Toolbar" drop-down menu button located in Quick Access Toolbar (QAT) as shown below.
Step 2 - Open "Excel Options" window's Quick Access Toolbar panel by clicking the "More Commands".
"Excel Options" window can be opened by following methods also.
• Click the "File" tab in Excel Ribbon and then click "Options". Select "Quick Access Toolbar" Panel.
• Right-click anywhere on the Ribbon. Click "Customize Quick Access Toolbar".
Step 3 - Click on "Choose Commands from" drop-down list, as shown in below image.
Step 4 - Click on "Macros" from drop-down list, as shown in below image.
Step 5 - Select the Macro you need to add to Excel Quick Access Toolbar (QAT) from left-side list. Click "Add" to add it to right-side list and then Click "OK".
Please note that no Macro will be displayed in left-side list until
1) Atleast a Macro is available (recorded or written) in the Excel workbook you are currently working with
2) A Macro is available in any other Excel workbook which is currently open.
Macro is added to Excel Quick Access Toolbar as shown below.
Now you may click the Macro icon from Excel Quick Access Toolbar (QAT) to run the Macro. Here in this example, the output of Macro is just a welcome message box, as shown below. In real-time, you may create and add very complex Macros to Excel Quick Access Toolbar. You can run your favourite macros easily from Excel Quick Access Toolbar (QAT), just by a single click.