Create a Macro Drop-Down Menu for the Office Quick Access Toolbar
Question details
Organize multiple VBA macros into a categorized drop-down menu accessible from the Office Quick Access Toolbar.

- Product
- Microsoft Office
- Device & OS
- not provided
- Scenario
- The user wants a single menu for launching macros grouped by category.
- Observed behavior
- Standard Quick Access Toolbar customization can add individual macros but does not create a grouped macro drop-down menu.
Identify the macros and categories you want in the menu, and use a macro-enabled document or add-in that contains those macros. The example below uses Excel and requires a RibbonX editor and permission to run trusted VBA macros.
Create a categorized macro menu with Ribbon XML
Use a custom Ribbon menu to group macros, then add it to the Quick Access Toolbar if your Office version offers that option.
The example creates a menu in an Excel workbook. RibbonX can also be used with other supported Office applications, but the file type and available controls may differ.
A custom Ribbon menu does not guarantee a Quick Access Toolbar drop-down: availability depends on the Office application, version, and control.
In Excel, choose File > Save As and select Excel Macro-Enabled Workbook (*.xlsm). Make sure the macros you want to run are in the workbook.
Press Alt+F11, choose Insert > Module, and add these procedures: Public Sub RunFormatting(control As IRibbonControl): Call YourFormattingMacro: End Sub and Public Sub RunReport(control As IRibbonControl): Call YourReportMacro: End Sub. Replace the placeholder names with existing public macros that take no arguments, then save and close the workbook.
Open the workbook in a RibbonX editor and insert an Office 2010 Custom UI part containing: <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"><ribbon><tabs><tab id="customTab" label="My Macros"><group id="macroGroup" label="Macro Tools"><menu id="macroMenu" label="Macros"><menu id="formatMenu" label="Formatting"><button id="formatButton" label="Run Formatting" onAction="RunFormatting"/></menu><menu id="reportMenu" label="Reports"><button id="reportButton" label="Run Report" onAction="RunReport"/></menu></menu></group></tab></tabs></ribbon></customUI>. Save the changes in the editor.
Reopen the workbook in Excel, enable macros only if you trust the file, and select My Macros > Macros. Open each category and select its button to test the corresponding macro.
Right-click the custom Macros menu on the Ribbon and look for Add to Quick Access Toolbar. If the command is available, select it; otherwise, use the custom Ribbon menu or add individual macros through File > Options > Quick Access Toolbar.

Use WPS Office as an alternative for everyday Office files
WPS Office is a free, lightweight Office alternative with a familiar interface for working with documents, spreadsheets, and presentations. Its support for VBA and custom Ribbon menus depends on the edition and environment, so verify your macro workflow before migrating.

Frequently Asked Questions
Can I create a grouped macro menu using only Quick Access Toolbar settings?
No. In Excel, File > Options > Quick Access Toolbar lets you add individual macros, but it does not create a categorized macro drop-down. Use a custom Ribbon menu or add-in for grouping.
Why do the Ribbon menu buttons need callback procedures?
RibbonX buttons call VBA procedures through their onAction attributes. The callbacks receive an IRibbonControl parameter and can then call your existing macros.
Why is my custom menu missing after reopening the workbook?
Check that the Ribbon XML was saved in the macro-enabled workbook using a RibbonX editor and that the XML is valid. Reopen the edited workbook and look for the custom My Macros tab.
Can I use the macro menu in every workbook?
A menu stored in an Excel workbook is available when that workbook is open. For wider availability, place the customization and macros in a trusted Excel add-in and load it through File > Options > Add-ins.
What if I cannot add the custom menu to the Quick Access Toolbar?
Use the menu on its custom Ribbon tab, or add macros individually through File > Options > Quick Access Toolbar. Support for adding a custom menu to the toolbar varies by Office application and version.




