Fix Microsoft Access Stopped Working After VBA CommandBar Code
Question details
Users are unable to open existing databases or create new ones in Microsoft Access after executing VBA code that hides all command bars.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Running VBA code to completely hide the Access interface by setting Application.CommandBars(i).Visible to False.
- Observed behavior
- Microsoft Access crashes, fails to open existing databases, or stops creating new files because the user interface is completely disabled by obsolete code.
Ensure you have access to the original database file on a local computer drive, as running Access applications directly from a removable USB drive on another machine can cause unexpected crashes.
Bypass Startup Code Using the Shift Key
Use the Shift key method to prevent the problematic VBA code from running automatically, allowing you to access the database and remove the obsolete code.
In newer versions of Microsoft Access, the traditional CommandBar interface has been replaced by the Ribbon. Using older VBA code to hide CommandBars can corrupt the application's startup sequence. Bypassing the startup code is the safest way to regain access to your file.
Before opening your database, press and hold down the 'Shift' key on your keyboard.
While continuing to hold the Shift key, double-click your Microsoft Access database file to open it.
Keep holding the Shift key until the database is fully open. This action forces Access to bypass all startup macros and VBA code.
Press 'Alt + F11' on your keyboard to open the Microsoft Visual Basic for Applications (VBA) editor.
Locate the 'Application.CommandBars(i).Visible = False' code in your modules, delete or comment it out, and then save the database.
Looking for a Lightweight Alternative for Data Management?
While Microsoft Access is used for complex databases, many data management tasks can be efficiently handled with robust spreadsheets. WPS Office provides a free, lightweight, and highly compatible alternative for your everyday document and data analysis needs, without the heavy interface issues of legacy database software.
- 1. Download the Installer: Visit the official WPS Office website and click the download button to get the free installation package.
- 2. Install WPS Office: Run the downloaded installer and follow the on-screen prompts to set up the software on your computer.
- 3. Open Your Files: Launch WPS Spreadsheets to instantly open, edit, and manage your existing Excel data files with full compatibility.

Frequently Asked Questions
Why does hiding CommandBars crash my Access database?
In modern versions of Microsoft Access, the traditional CommandBar interface has been replaced by the Ribbon UI. Forcing the application to hide all CommandBars via obsolete VBA code can leave the program without a valid user interface, causing it to freeze, crash, or fail to open files properly.
Can I run an Access database directly from a USB flash drive?
It is highly discouraged. Running a Microsoft Access application directly from a removable drive on another computer can cause stability issues, missing reference errors, and permanent file corruption. Always copy the database to a local hard drive before opening it.
Is Microsoft Access included in my Microsoft 365 Family subscription?
Microsoft Access is only included in the PC version of Microsoft 365 Personal and Family subscriptions. It is not available for Mac users. If you cannot find Access, you may need to verify your subscription details or switch to a data management alternative like advanced spreadsheets.




