VBA & Macro Problems

Fix Excel Crashing When Saving After Deleting Combo Box

Huda QurayshiHuda Qurayshi Nov 2, 2026 868 views

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.

Fix Excel Crash When Saving After Deleting a Combo Box
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.
Before you start

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.

Solution 1Recommended

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.

1
Open Excel Options

Launch Microsoft Excel. Click on the 'File' tab in the top-left corner, and select 'Options' from the bottom of the left-hand menu.

2
Navigate to Advanced Settings

In the Excel Options dialog box, click on 'Advanced' in the left pane.

3
Disable Graphics Acceleration

Scroll down to the 'Display' section. Check the box next to 'Disable hardware graphics acceleration'.

4
Restart and Test

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.

Disable Hardware Graphics Acceleration in Excel
Note on Newer Excel Versions: In some newer builds of Microsoft 365, the 'Disable hardware graphics acceleration' option has been removed from the UI. If you cannot find it, you may need to disable it via the Windows Registry under the Office Common Graphics keys.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the free installation package.
  2. 2. Install WPS Office: Run the installer and follow the on-screen prompts to set up the software on your computer.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing .xlsx workbooks seamlessly to continue working without crash interruptions.
Highly compatible with Microsoft Excel formats (.xlsx, .xls, .xlsm, .csv)Lightweight architecture minimizes unexpected application crashes and access violationsFamiliar user interface requires zero learning curve for Excel usersFree to download and use for your everyday spreadsheet and data analysis tasks
QA img-9

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.