Fix Excel Crashing When Saving After Deleting Combo Box
Question details
The user needs to stop Excel from crashing and restarting when a custom VSTO add-in attempts to save the workbook immediately after deleting a combo box control.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Deleting a combo box UI control and programmatically saving the active workbook via a VSTO add-in.
- Observed behavior
- Excel completely crashes and restarts, while the Windows Event Log records an access violation specifically in the VBE7.DLL module.
Attach the Visual Studio debugger to your Excel process to pinpoint the exact line of code causing the crash, and temporarily disable all other third-party COM add-ins to rule out external conflicts.
Disable Hardware Graphics Acceleration in Excel
Turning off hardware graphics acceleration can resolve UI-rendering conflicts that trigger access violations in VBE7.DLL when controls are dynamically removed.
Hardware graphics acceleration sometimes struggles to properly render the Excel interface when ActiveX controls or form controls like combo boxes are suddenly deleted via code. Disabling this setting forces Excel to use software rendering, which can bypass the crash.
Launch Microsoft Excel. Click on the 'File' tab in the top-left corner, and select 'Options' from the bottom of the left-hand menu.
In the Excel Options dialog box, click on 'Advanced' in the left pane.
Scroll down to the 'Display' section. Check the box next to 'Disable hardware graphics acceleration'.
Click 'OK' to save your changes. Completely close and restart Excel, then run your VSTO add-in to test if the crash still occurs when saving.

Isolate the Control Deletion and Save Operations
Separate the combo box deletion from the save command to ensure Excel releases the VBE7.DLL memory reference before attempting to write to the disk.
Experience Stable Spreadsheet Management with WPS Office
If complex VSTO add-in compatibility issues and persistent VBE7.DLL crashes continue to disrupt your development or workflow in Excel, consider switching to WPS Office. It provides a highly stable environment for all your spreadsheet needs without the overhead of legacy COM add-ins.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package.
- 2. Install WPS Office: Run the installer and follow the on-screen prompts to set up the software on your computer.
- 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing .xlsx workbooks seamlessly to continue working without crash interruptions.

Frequently Asked Questions
What causes the VBE7.DLL access violation in Excel?
A VBE7.DLL access violation typically occurs when there is memory corruption or an invalid COM object reference. It is often triggered when VBA or a VSTO add-in attempts to interact with or save a workbook while the engine still holds an unstable reference to a UI control (like a combo box) that was recently modified or deleted.
Does disabling hardware graphics acceleration always fix Excel crashes?
Not always. While it effectively resolves UI rendering-related crashes when controls are updated, issues caused by unreleased COM objects, corrupted memory, or faulty add-in code will still require debugging the add-in and ensuring all objects are properly disposed of before executing a save.
How can I prevent my VSTO add-in from causing Excel to restart during a save?
Ensure your code explicitly releases all COM objects using `Marshal.ReleaseComObject()` after you are done interacting with Excel interop objects. Additionally, avoid stacking heavy UI modifications (like deleting shapes or combo boxes) immediately before a `Workbook.Save()` command; adding a slight asynchronous delay can give Excel time to process the changes safely.




