Fix Excel C0000005 Access Violation When Opening a VBA Workbook
Question details
Excel crashes with access violation exception code C0000005 when the user opens a workbook that contains VBA macros.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user needs to open and work with a VBA-enabled Excel workbook without Excel closing unexpectedly.
- Observed behavior
- Excel crashes while opening the VBA workbook and reports exception code C0000005, which can be related to add-ins, workbook damage, display drivers, Office installation issues, or hardware conflicts.
Close Excel completely before testing. If the workbook is stored on a network drive or cloud folder, copy it to a local folder first so you can determine whether the crash is related to the file location.
Start Excel in Safe Mode and disable conflicting add-ins
Use this method first to determine whether an Excel add-in, COM add-in, or third-party integration is causing the access violation.
Safe Mode starts Excel with most extensions disabled. If the VBA workbook opens in Safe Mode, re-enable add-ins one at a time to identify the conflict.
Hold the Ctrl key while starting Excel, then select Yes when Excel asks whether to start in Safe Mode.
In Safe Mode, select File > Open > Browse and open the affected workbook from its local folder.
If the workbook opens, restart Excel normally and go to File > Options > Add-ins. Select Excel Add-ins in the Manage list, choose Go, clear all selected add-ins, and select OK.
Return to File > Options > Add-ins, select COM Add-ins in the Manage list, choose Go, clear enabled items, and select OK. Restart Excel and test the workbook again.
Re-enable one add-in at a time from File > Options > Add-ins, restarting Excel and reopening the workbook after each change until the crash returns.

Test the workbook and repair a damaged Excel file
Use this method when other workbooks open normally or when the crash occurs only with one VBA-enabled workbook.
Update display components and repair Microsoft Office
Use this method when Excel crashes with multiple workbooks or continues to crash after add-ins have been disabled.
Open Excel Workbooks with WPS Spreadsheets While You Troubleshoot Excel
If Microsoft Excel continues to crash, WPS Office provides a free, lightweight spreadsheet alternative with a familiar interface. You can open the workbook in WPS Spreadsheets to access compatible worksheet content and determine whether the issue is isolated to the Excel installation. Test VBA macro behavior carefully before using the file for production work.

Frequently Asked Questions
What does Excel error C0000005 mean?
Exception code C0000005 usually indicates an access violation, meaning Excel tried to access memory incorrectly. Common causes include faulty add-ins, damaged workbooks, graphics-driver conflicts, Office installation problems, and hardware issues.
How do I open Excel in Safe Mode?
Hold Ctrl while launching Excel and select Yes at the Safe Mode prompt. You can also press Windows+R, type excel /safe, and select OK.
Why does only one VBA workbook crash Excel?
If other workbooks open normally, the affected file may have damaged workbook content, broken external connections, incompatible controls, or a VBA-related issue. Use File > Open > Browse > the Open arrow > Open and Repair to test the file.
Can an external monitor cause Excel to crash?
A display-driver or multi-monitor conflict can contribute to Excel crashes. Disconnect the external display or set the laptop display as primary in Windows Settings > System > Display, then test the workbook again.
Will repairing Microsoft Office remove my Excel files?
No. Quick Repair and Online Repair repair the Office application installation rather than deleting your workbooks. Close all Office apps before starting the repair from Windows Settings > Apps > Installed apps > Microsoft 365 or Office > Modify.




