logo
search
Office Settings & Configuration

How to Hide the Ribbon and Show Tabs Only with VBA in Access

Huda QurayshiHuda Qurayshi Oct 9, 2026 871 views

Question details

Minimize the Microsoft Access ribbon programmatically using VBA so that only tabs appear when an application or report starts.

How to Hide the Ribbon and Show Tabs Only with VBA
Product
Microsoft Access
Device & OS
not provided
Scenario
Setting up a cleaner user interface by collapsing the ribbon automatically upon launching an Access report or application.
Observed behavior
The user needs a reliable method to check the ribbon's state and minimize it, displaying only the tabs without manual clicks.
Before you start

Ensure you have basic familiarity with the Microsoft Access VBA editor. It is recommended to back up your database before adding macro or VBA code to application events.

Solution 1Recommended

Use the ExecuteMso Command to Toggle the Ribbon

Run a built-in macro command in the On Load or On Open event to minimize the ribbon to its tabs.

Microsoft Access provides a built-in command to execute Ribbon actions. By triggering the 'MinimizeRibbon' command, you can automatically hide the ribbon controls, leaving only the top tabs visible.

1
Open the VBA Editor

Open your report or form in Design View, select the 'Event' tab in the Property Sheet, and click the builder button (...) next to 'On Load' or 'On Open' to open the VBA Editor.

2
Insert the ExecuteMso Command

Inside the event procedure, type the following code: CommandBars.ExecuteMso "MinimizeRibbon"

3
Save and Test

Save your VBA code and switch the report to Report View. The ribbon should toggle to a minimized state, displaying only the tabs.

Use the ExecuteMso Command to Toggle the Ribbon
Toggle Behavior: The 'MinimizeRibbon' command acts as a toggle switch. If the ribbon is already minimized when the code runs, executing it will expand the ribbon instead.
Free Microsoft Office alternative

Looking for a Free, Lightweight Office Suite?

While Microsoft Access is used for complex database management, everyday document, spreadsheet, and presentation tasks can be handled seamlessly with WPS Office. It offers a highly compatible, free, and lightweight alternative to Microsoft Office.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install the Suite: Run the installer and follow the on-screen instructions to quickly set up WPS Office on your device.
  3. 3. Open Your Files: Launch WPS Office and directly open your existing Office files without worrying about formatting loss.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx)Lightweight application that uses minimal system resources and runs smoothly on older PCsFamiliar ribbon interface that requires almost zero learning curveBuilt-in PDF reader, editor, and seamless format converter
microsoft office alternative - wps office

Frequently Asked Questions

Can I use the MinimizeRibbon command in Excel or Word VBA?

Yes, the CommandBars.ExecuteMso "MinimizeRibbon" command interacts with the general Office Ribbon UI. It can be used in Excel, Word, and PowerPoint VBA to achieve the same toggling effect.

How do I completely hide the ribbon instead of just minimizing it to tabs?

To completely hide the ribbon in Access, you would typically use DoCmd.ShowToolbar "Ribbon", acToolbarNo. This removes the ribbon entirely, whereas the minimize command only hides the buttons and leaves the tabs visible.

Why isn't my ribbon height check working accurately?

The ribbon height can vary based on your Office version, display scaling, and screen resolution. If the > 128 threshold doesn't work, use MsgBox CommandBars("Ribbon").Height while the ribbon is expanded to find the exact pixel height for your specific environment.