Why Excel Crashes
There are many reasons why Excel might crash, and many many more rumours. The reality is modern versions of Excel, especially 2003, are very mature and very stable.
In our experience most Excel misbehaviour, whether its a full crash, a lock-up or just general 'oddness' is caused by poorly coded add-ins.
Therefore our advice is always check this first. The easiest way to do that is to start Excel with no add-ins loaded and see if the problem persists.
- If the problem persists then its not an add-in issue
- If the problem goes away then each add-in should be loaded one at a time and tested until the one that causes the problem is identified.
The issue with loading Excel with no add-ins is that is actually quite tricky because there are so many different technologies that can be used to extend Excel.
- Basic VBA add-ins in .xlas, .xlams etc
- COM add-ins in VB 5 and 6, and .net, with and without a shim, user specific and machine based
- Native code xll add-ins
- Automation addins
- XLSTART workbooks - not technically add-ins but can still mess things up
Another complication is that sadly the cause of problems can often be the interaction of multiple add-ins rather than any one in isolation. A common issues for example is multiple add-ins trapping the same event - if they retrigger event that others add-in trap, the whole thing can end in an eternal loop that brings Excel down. Add-in authors should be aware of the correct way to manage events, but too few are, especially in-house developers.
Starting Excel with no Add-ins
Common advice is to start Excel from the command prompt (Windows Start>>Run) using
Where s is the start up parameter that tells Excel to start in safe mode. It turns out though that safe mode merely doesn't run anything in the XLSTART folder. The correct switches are:
excel.exe /s /automation
/automation starts Excel as if it has been automated by another process, in this mode Excel does not load any add-ins.
To make it easy though, Codematic has created the Excel Safe Start Utility. This is a small application with a single button to open Excel in this fully safe mode with no other workbooks or add-ins. The utility can also be used to open multiple Excel instances.
Problems persist even in safe mode
If the poblems with Excel persist even with no add-ins loaded then the next step is to try a 'Detect and Repair'. If that doesn't resolve the issue then a full re-install is the next step. Note though that a full re-install is unlikely to fix an add-in issue as many add-ins are not removed as part of the removal.