Forum Discussion
Help! Excel crashing when opening a workbook.
The event log you provided indicates an application error with Excel (EXCEL.EXE) crashing due to an exception code (c0000005). This code typically indicates an access violation, which means Excel attempted to access memory that it shouldn't have, leading to the crash.
Here are a few troubleshooting steps you can try to address this issue:
- Update Excel and Windows: Ensure that both Excel and Windows are fully up to date. Sometimes, issues like this can be resolved by installing the latest updates, as they may contain bug fixes or improvements that address the problem.
- Check for Add-ins: Disable any Excel add-ins or third-party software that might be conflicting with Excel. Sometimes, conflicts with add-ins or other software can cause Excel to crash.
- Check for Corrupted Files: Check if the Excel file itself is corrupted. Try opening other Excel files on the affected PC to see if they also cause Excel to crash. If only one specific file is causing the issue, it may be corrupted. In this case, try opening the file on another PC or using Excel's built-in repair functionality.
- Test in Safe Mode: Try opening Excel in Safe Mode to see if the issue persists. This can help determine if the problem is related to an add-in or other customization. To open Excel in Safe Mode, hold down the Ctrl key while launching Excel.
- Repair Office Installation: Use the built-in repair functionality in Office to repair the installation. This can fix any corrupted files or settings that may be causing the issue.
- Check for Hardware Issues: Sometimes, hardware issues such as faulty RAM can cause applications to crash. Run hardware diagnostics on the affected PC to check for any hardware problems.
If none of the above steps resolve the issue, it may be necessary to further investigate the specific circumstances under which the crash occurs. You may also consider contacting Microsoft support for assistance, as they may be able to provide more detailed troubleshooting steps or escalate the issue if necessary.FormularbeginnThe text and steps were edited with the help of AI.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and Like it!
This will help all forum participants.
Thanks for your suggestions, much appreciated as Microsoft support are being very unhelpful so far!
All installs are up to date and have no add-ins beyond VBA.
As I explained, what's unusual is that once the file opens its inconsistent as to if it'll crash or not, it's like a 1 in 10 tries on a specific PC which causes the crash. Further, once the crash occurs, the file seems tainted as it'll fail to open on any Windows PC on the business network then but weirdly does open on a Mac OS and saving from that PC (Without any edits) then makes the file un-tainted? All very odd!
I tried an office install repair and a complete uninstall, registry/leftover files purge and re-install both didn't resolve the issue.
I've have tried a file repair and that also seems to work, but I'm apprehensive about what changes the repair has made, is there a log of the fixes it's made so I can verify?
Many thanks in advance!
John.
- Patrick2788Feb 22, 2024Silver Contributor
The best way to resolve this may be to get the workbook open by any means possible. Backup the modules in the XLSM. Save as XLSX to strip the code from the workbook. Close it and open again. Re-introduce the macros into the book by importing the modules. Save as XLSM and hope for the best.
This is another reason why I use vba as a last resort. At the moment I only use code to time calculations. With stricter security settings, vba is not worth the struggle when there are other options available.
- avgstephenAug 01, 2024Copper Contributor
when the files are not stable while opening, do you have any idea how to convert it to xlsx from xlsxm.
- Patrick2788Aug 01, 2024Silver ContributorIf the xlsm won't open you have a few options to try.
1. Re-name the .xlsm to .zip and open the zip package. Delete the bin file from the zip package to remove macros and then re-name back to .xlsm to see if file opens. If it opens, save as xlsx.
2. Open the xlsm in Excel for the Web (or any app that won't recognize the code) and then convert it to xlsx.
- johnpiper-Feb 22, 2024Copper Contributor@Patrict2788 That's an interesting idea, I might try that too 🤔. Is your thinking to mitigate any corrupt segment of the existing Workbook?
Another thing on my list to check is Workbook links. I've noticed some defunct Workbooks referenced for Name Definitions where the workbook and the Definition are both irrelevant and the Workbook source non-existent. For example, they reference an E drive on PCs without a mapped E drive.
Do you think these could be a cause of a crash? Or likely unharmful? And is there any way to turn the silly feature of Workbook links off? I wish Microsoft never made it as a feature!- Patrick2788Feb 22, 2024Silver Contributor
These are some of the things that usually cause corruption:
-exorbitant amount of cell styles (default for new workbook is 47. Workbooks with 10,000+ may have a problem).
-exorbitant amount of objects (shapes, pictures, text boxes, etc.). Slows navigation.
-used range exceeeds data entered on a given sheet. Ctrl+End goes down to well below the last used row. Causes file bloat.
-workbook is loaded with 20+ vba modules
-workbook contains a ton of named items and/or external workbooks (Many of which may be broken)If you're using Excel at work (Enterprise version), you can run Workbook Analysis and tell you more about a workbook. It's a good way to find problem areas:
- NikolinoDEFeb 19, 2024Gold Contributor
When you perform a repair on an Office installation, the repair process typically doesn't provide detailed logs of the specific fixes it makes. However, it's designed to identify and correct issues within the Office installation that may be causing problems, such as missing or corrupted files, registry entries, or settings.
If you are concerned about the changes made during the repair process and want to verify what was modified or fixed, you can try the following steps:
- Check Event Viewer: Look for any related events in the Windows Event Viewer that occurred during the repair process. While the repair process itself may not be logged, any errors or warnings related to Office or Excel may provide additional information about the changes made.
- Review System Logs: You can review system logs and error reports generated by Windows during the repair process. These logs may contain information about the actions taken by the repair tool and any files that were modified or replaced.
- Compare File Versions: After the repair process, you can compare file versions of Office-related files before and after the repair. This can be done by checking the file properties or using third-party file comparison tools. Look for any differences in file versions, timestamps, or sizes.
- Test the File: After the repair, thoroughly test the affected Excel file to ensure that the issue is resolved and that the file behaves as expected. Pay attention to any changes in functionality or behavior compared to before the repair.
- Monitor System Performance: Keep an eye on system performance and stability after the repair. If the issue persists or if you encounter any new problems, it may indicate that the repair did not fully resolve the underlying issue.
If you continue to experience problems or are unsure about the changes made during the repair process, I would recommend contacting your IT support or a trusted support center near you.
Thank you for your patience and understanding.
- johnpiper-Feb 22, 2024Copper ContributorNikolinoDE
So an Open & Repair fixes the file, and it's usable for a long while, and then breaks again. When it reoccurs, the file repair again fixes the problem?