Troubleshooting
Problem
User opens an Excel spreadsheet which contains macros (*.xlsm file).
User presses 'Save' (inside Excel). An error appears.
Symptom
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
----------------------------------------------------
Related Information
Was this topic helpful?
Document Information
Modified date:
04 September 2018
UID
ibm10730287