Excel crashes in VBE7.DLL running or enabling macro
Question
Monday, September 4, 2017 5:50 AM | 1 vote
Hi,
I am having a problem with some users at my office. Somehow the macros in their Excel workbooks become corrupted at random and cause Excel to crash when "Enabling Macros". This issue is described here: https://blogs.technet.microsoft.com/the_microsoft_excel_support_team_blog/2012/09/07/excel-crashes-in-vbe7-dll-running-or-enabling-macro/
It is easy enough to fix by turning off the compile on demand option but it keeps coming up and the registry fix does not work. Is there any known causes for this issue and is there anyway to prevent it from happening?
All replies (5)
Tuesday, September 5, 2017 9:24 AM
Hi retep292,
This forum(Excel for Developers) is for development issues related to Excel Object Model and your problem is more related to Excel product feature, so I would move this thread into Excel IT Pro Discussions.
Thanks for your understanding.
Best Regards,
Terry
Wednesday, September 6, 2017 10:15 AM
Hi,
What's your detailed Excel version? I notice that the Macro crash issue happens randomly. Please check if you can reproduce the issue with new created simple macros.
In Excel, go to File > Account > About Excel to collect the detailed Excel version number. Additionally, please share the complete crashing logs here for further analysis.
Best Regards,
Winnie Liang
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Sunday, September 10, 2017 11:10 PM
Hi Winnie,
We have a few different versions of Excel in use, including:
- 14.0.7184.5000 (32-bit) -most common
- 14.0.6023.1000 (64-bit)
- 16.0.7726.1049 (64-bit)
We also use a number of Excel add-ins. I cannot replicate, it seems to be just random when a macro becomes corrupted.
Here is the error in event viewer: https://1drv.ms/i/s!As-hAQ4gQFQ-qjYTNok8RROmJeWH
Edit: It might be also worth noting that we patch the 32-bit executable to be "Large Memory Address Aware" so it can be allocated the maximum 4GB of memory. Could this be the cause of this instability?
Tuesday, September 12, 2017 9:20 AM
Hi Winnie,
We have a few different versions of Excel in use, including:
- 14.0.7184.5000 (32-bit) -most common
- 14.0.6023.1000 (64-bit)
- 16.0.7726.1049 (64-bit)
We also use a number of Excel add-ins. I cannot replicate, it seems to be just random when a macro becomes corrupted.
Here is the error in event viewer: https://1drv.ms/i/s!As-hAQ4gQFQ-qjYTNok8RROmJeWH
Edit: It might be also worth noting that we patch the 32-bit executable to be "Large Memory Address Aware" so it can be allocated the maximum 4GB of memory. Could this be the cause of this instability?
Hi,
It is hard to narrow down the issue since the issue happens randomly. Try to record a simple Macro code in a small size document which don't requires high memory, check if the issue can be reproduced.
About 32 bit or 64 bit Excel, if you are deal with large data sets, a 64 bit Excel application is a better choose. You can refer to the following article for more information about 64bit and 32bit Excel:
Best Regards,
Winnie Liang
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Tuesday, April 17, 2018 8:35 PM | 1 vote
We had the same exact issue:
Problem signature:
Problem Event Name: APPCRASH
Application Name: EXCEL.EXE
Application Version: 16.0.8431.2215
Application Timestamp: 5a745cd2
Fault Module Name: VBE7.DLL
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 59bae6d1
Exception Code: c0000005
Exception Offset: 00000000000f5b82
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Files containing macros and that linked to other worksheets crashed Excel in vbe7.dll.
We were able to fix the issue by following these MS articles:
https://support.microsoft.com/en-us/help/3085435/august-8-2017-update-for-excel-2016-kb3085435
The following registry changes were needed:
**HKEY_CURRENT_USER\Software\Microsoft\VBA\7.0\Common**
Type: **DWORD**
Name: **CompileOnDemand**
Value: **0**
- Locate and then select the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Excel\Options\
On the Edit menu, point to New, and then click **DWORD **Value.
Type ForceVBALoadFromSource, and then press Enter.
In the Details pane, right-click ForceVBALoadFromSource, and then click Modify.
In the **Value **data box, type 1, and then click OK.
You can perform the same changes by running these 3 commands:
Reg.exe add "HKCU\Software\Microsoft\Office\16.0\Excel\Options" /v "ForceVBALoadFromSource" /t REG_DWORD /d "1" /f
Reg.exe add "HKCU\Software\Microsoft\VBA\7.0\Common" /v "CompileOnDemand" /t REG_DWORD /d "0" /f
Reg.exe add "HKCU\Software\Microsoft\VBA\7.1\Common" /v "CompileOnDemand" /t REG_DWORD /d "0" /f