IBM Support

"Microsoft Excel has stopped working ... APPCRASH EXCEL.EXE VBE7.DLL" error when saving 'bad' Excel spreadsheet

Troubleshooting


Problem

User opens an Excel spreadsheet which contains macros (*.xlsm file).

User presses 'Save' (inside Excel). An error appears.

Symptom

image-20180904155505-1

Microsoft Excel has stopped working

Problem Event Name: APPCRASH

Application Name: EXCEL.EXE

Fault Module Name: VBE7.DLL

Cause

Corruption inside the Macro portion (VBA) of the Excel spreadsheet.

Resolving The Problem

Fix:

Recompile the VBA (macro) project.

Steps:

1. Open the workbook in Excel.

2. Click "ALT+F11" to open the VBA editor

3.  Double-click your module (or first module that contains your project)

4. Add a commented line of code such as:

‘ This is a comment

 

5. Click on the Debug menu (at the top) and click 'Compile VBA Project'.

6. Repeat the above for each module in your workbook

7. Save the workbook (spreadsheet).

8. Close the workbook and re-open it

9. Test.

 

Workaround:

Disable Compile on Demand

Steps:

1. Open the workbook in Excel.

2. Click "ALT+F11" to open the VBA editor

3. Click "Tools > Options > General" tab

4. Untick the box “Compile on Demand”.

 

--------------------------------------------------

Alternatively you can set the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\VBA\7.0\Common
Type:  DWORD
Name:  CompileOnDemand
Value:  0

----------------------------------------------------

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS9S6B","label":"IBM Cognos Controller"},"Component":"","Platform":[{"code":"PF033","label":"Windows"}],"Version":"10.3.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
04 September 2018

UID

ibm10730287