Forum Discussion
Help! Excel crashing when opening a workbook.
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.
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:
- ZoeJar_1316Apr 04, 2024Copper Contributor
I have been dealing with this issue for more than 14 months on a Mac. I have tried all of the solutions offered (don't have any addins) and it happens right after I open Excel with nothing else open, so it is not a corrupted file. I have uninstalled and reinstalled so many times and keep everything up to date.
My favorite response was when I reached out to MS, I was told it was not a problem with Excel and I said, everytime I search for answers there are a lot of people out there with the same issue and it is across platforms. It is a problem with Excel. He dropped our chat.
It is beyond frustrating as I use Excel every day and nothing I have tried resolves the problem. If anyone knows some thing that would work to MS to look into the problem and fix it, I would love a suggestion.