How to Get the Active Microsoft Access Ribbon Name Using VBA
Question details
The user needs a way to identify the currently active custom ribbon in Microsoft Access using VBA to dynamically hide or show graphics based on the selected ribbon.
- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Managing an Access database with multiple custom ribbons and needing to programmatically check which ribbon is actively displayed.
- Observed behavior
- The user wants to retrieve the name of the application's selected ribbon or the ribbon assigned to specific forms/reports.
Ensure that your Microsoft Access database has custom ribbons defined in the USysRibbons table and that you have enabled macro and VBA execution in the Trust Center.
Retrieve the Application-Level Custom Ribbon ID
Use the CurrentDb properties to fetch the name of the custom ribbon that is globally assigned to the Microsoft Access application.
This approach reads the database properties directly to find the application-wide ribbon name. It is ideal when you have a primary custom ribbon set for the startup of the database.
Press ALT + F11 in Microsoft Access to open the Visual Basic for Applications (VBA) editor.
In your desired module or event procedure, enter the following code: MsgBox CurrentDb.Properties("customribbonid")
Run the macro or trigger the event to display a message box containing the name of the active application-level ribbon.

Track Form or Report-Level Ribbons with Global Variables
If your custom ribbons are assigned individually to specific forms or reports rather than the whole application, use a global variable to track the active ribbon state.
Try WPS Office for Your Spreadsheet and Document Needs
While Microsoft Access is a specialized database tool, WPS Office provides a lightweight, comprehensive, and free alternative for your daily Word, Excel, and PowerPoint tasks. It supports VBA macros in spreadsheets and offers seamless Microsoft Office format compatibility.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package.
- 2. Install the software: Run the installer and follow the on-screen prompts to set up WPS Office on your computer.
- 3. Open your files: Easily open your exported Access data or existing Excel workbooks directly in WPS Spreadsheets to continue your data analysis.

Frequently Asked Questions
Why do I get a 'Property not found' error when calling CurrentDb.Properties("customribbonid")?
This error occurs because the 'customribbonid' property is only appended to the CurrentDb.Properties collection after a custom ribbon has been explicitly set in the Access Options (Current Database -> Ribbon Name). If it's left blank, the property does not exist.
Can I dynamically change the active Access ribbon using VBA after startup?
You cannot change the main application ribbon directly via VBA once the database is running. However, you can load ribbons using Application.LoadCustomUI and dynamically assign them to specific forms by changing the form's RibbonName property before it is opened.
How do I assign a custom ribbon to a specific form without using VBA?
Open the form in Design View, press F4 to open the Property Sheet, click on the 'Other' tab, and type the exact name of your loaded custom ribbon into the 'Ribbon Name' property field.




