Excel crashes on macro-enabled files? Fix the top 3 causes
Excel crashing when opening .xlsm or .xlsb files? Nine times out of ten it’s a corrupt Personal Macro Workbook, a wonky add-in, or a bad COM reference. Here’s how to fix each in 5 minutes.
1. Corrupt Personal Macro Workbook (PERSONAL.XLSB)
I know this error is infuriating—you’re just trying to open a macro-enabled workbook, and boom, Excel vanishes. Nine out of ten times, the culprit is your Personal Macro Workbook (PERSONAL.XLSB). This hidden file loads every time Excel starts. If it’s corrupt, any macro-enabled file can trigger a crash.
Here’s the fix:
- Close Excel completely.
- Open File Explorer and paste this path into the address bar (adjust for your Office version):
%APPDATA%\Microsoft\Excel\XLSTART - Look for
PERSONAL.XLSB(orPERSONAL.XLS) and rename it toPERSONAL.XLSB.old. Don’t delete it yet—you might want its macros later. - Reopen Excel and try opening your macro file again. If it works, bingo. The old PERSONAL.XLSB was toast.
Why this works: Excel loads PERSONAL.XLSB silently in the background. If one byte in that VBA project is corrupt, Excel doesn’t gracefully degrade—it just crashes. Renaming it forces Excel to start fresh. You can recover macros from the old file later by renaming it back and copying them out manually.
2. Conflicting Add-ins (COM Add-ins Are the Worst)
If renaming PERSONAL.XLSB didn’t fix it, the next suspect is an add-in. And I’m not talking about the built-in Analysis ToolPak—I mean third-party COM add-ins. Things like PDF converters, ERP connectors, or even old Office add-ins from 2019. They hook into Excel’s VBA environment and can choke when opening macro files.
How to test this:
- Hold the Ctrl key and double-click the macro file. This opens Excel in Safe Mode, which disables all add-ins.
- If the file opens, you’ve found the problem: an add-in is the enemy.
- Go to File → Options → Add-ins. At the bottom, set the dropdown to COM Add-ins and click Go.
- Uncheck everything. Click OK, restart Excel normally, and open the file.
- If it opens, start re-enabling add-ins one at a time until it breaks again. That’s your culprit.
Pro tip: The worst offenders are add-ins that interact with the VBA object model—things like SmartInspect or old SAP connectors. If you find one, check for an update or bin it.
3. VBA References Broken in the File Itself
Sometimes the file you’re opening has a missing or broken VBA reference. This happens when someone sent you a workbook that references a library (like an old Access database or a custom DLL) that isn’t on your machine. Excel tries to load it, fails, and crashes.
How to diagnose:
- Open Excel first (not the file). Press Alt+F11 to open the VBA editor.
- Go to Tools → References. If any reference shows MISSING (it’ll be listed with “MISSING” in brackets), that’s the problem.
- Uncheck that reference. Try opening the file again.
- If the file still crashes, the corruption may be deeper. Try opening the file in a clean instance: hold Ctrl while opening Excel, then use File → Open to open the problem workbook.
When all else fails: If the file still won’t open, use the Open and Repair feature: File → Open → Browse → select the file → click the arrow next to Open → Open and Repair. This strips out corrupted VBA code and can salvage the data. You’ll lose the macros, but you’ll get your data back.
Quick-Reference Summary Table
| Cause | Symptom | Fix |
|---|---|---|
| Corrupt Personal Macro Workbook | Excel crashes immediately when opening any macro file, even fresh ones | Rename PERSONAL.XLSB in XLSTART folder to .old |
| COM add-in conflict | Excel crashes only on macro files, safe mode works | Disable all COM add-ins, re-enable one by one |
| Missing VBA references | Crash on a specific macro file, other macro files open fine | Uncheck missing references in VBA editor or use Open and Repair |
That’s it. Three causes, three fixes. Start with step one—it’s the most common by a mile. And if you’re on Office 365 with Windows 11, check for Windows updates too. A semi-annual update once broke the VBA engine itself (KB5008212, I’m looking at you). Good luck—you’ve got this.
Was this solution helpful?