How to Fix Microsoft Access Crashing in the VBA Editor
Question details
The user needs to stop Microsoft Access from crashing while entering or editing code in the VBA Editor.

- Product
- Microsoft Access
- Device & OS
- Windows
- Scenario
- Entering or editing VBA code in a Microsoft Access database.
- Observed behavior
- MSACCESS.EXE repeatedly crashes, generating an ntdll.dll error with exception code 0xc0000374 in the Windows Event Viewer.
Ensure you create a complete backup copy of your Access database file (.accdb or .mdb) before attempting any decompilation, repair, or object imports to prevent accidental data loss.
Test Scope and Selectively Import Database Objects
Determine if the crash is isolated to a specific database and rebuild it by carefully importing objects to isolate the corruption.
Create a brand-new, blank Microsoft Access database to test if the VBA Editor crashes in a clean environment. If it works, the issue is isolated to your original file.
In your new database, navigate to the 'External Data' tab and select 'New Data Source' > 'From Database' > 'Access'.
Import tables, queries, forms, and modules one by one or in small batches. Test the VBA editor after each batch to identify the exact corrupted object causing the crash.

Run Access in Safe Mode and Disable Add-ins
Third-party add-ins can conflict with the VBA Editor. Running Safe Mode helps bypass these conflicts.
Install Updates and Repair Microsoft Office
System-level DLL errors (like ntdll.dll) can often be fixed by updating or repairing the Office installation suite.
Experience a Stable, Crash-Free Office Suite with WPS Office
Tired of troubleshooting unexpected Microsoft Office crashes and DLL errors? WPS Office offers a lightweight, highly stable alternative for your everyday document, spreadsheet, and presentation needs. While it doesn't replace database-heavy MS Access, it is fully compatible with Word, Excel, and PowerPoint files.
- 1. Download the installer: Visit the official WPS Office website and download the free installation package for Windows.
- 2. Install WPS Office: Run the lightweight installer and follow the quick on-screen prompts to set up the software.
- 3. Open your files safely: Open your existing Word, Excel, or PowerPoint files directly in WPS to experience stable, crash-free editing.

Frequently Asked Questions
What causes the ntdll.dll 0xc0000374 exception code in Microsoft Access?
This exception code typically indicates heap corruption in Windows memory. In Microsoft Access, it usually happens when corrupted VBA code, specific form controls, or conflicting COM add-ins attempt to access protected memory, causing the application to abruptly crash.
Does decompiling an Access database fix VBA crashes?
Sometimes. Running Access with the `/decompile` switch removes all compiled VBA code and leaves only the source code. This can fix crashes if the compiled state was corrupted. However, if the issue lies in the source code or forms, decompiling won't be enough, and you will need to selectively import objects into a new database.
Why does my Access database still crash after importing it into a new file?
If you imported all tables, queries, forms, and modules at once, you likely carried over the corrupted object causing the crash. You must import objects selectively in small batches, testing the VBA Editor after each batch, to isolate and exclude the specific corrupted element.
Can Windows updates cause Microsoft Access VBA to crash?
Yes, occasionally a newly released Windows or Office update can introduce bugs or incompatibilities with specific VBA libraries. Ensuring both your Windows OS and Microsoft Office suite are fully updated to the latest patch often resolves these known issues.




