Excel 64-bit crashes in vbe7.dll when saving files with macros and CompileOnDemand=1 and ForceVBALoadFromSource=0

We keep having this 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

https://blogs.technet.microsoft.com/the_microsoft_excel_support_team_blog/2012/09/07/excel-crashes-in-vbe7-dll-running-or-enabling-macro/

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

I am wondering if anyone else has this issue. If we remove these 2 registry settings, we start getting these crashes again. Any idea why Excel would crash without these 2 registry settings? In my understanding Excel should be catching exceptions and errors and should never outright crash. Why would these 2 settings prevent the crashes?

Hi MG565,

The registry entries that correspond to the settings for the Visual Basic editor are located under a different subkey. In Office 2010 or later, the registry entries are located under the following subkey: HKEY_CURRENT_USER\Software\Microsoft

 

Thanks,

Neha

-----------
•Beware of Scammers posting fake Support Numbers here.
•Please let us know if this is helpful and if the solution worked for you, as it can benefit others who are facing the same scenario.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I don't think your answer is answering the question asked, @Neha Singh.

6 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi M G 123,

This was the issue previously and cause is that Excel does not correctly save the compile state of the VBA code and 64-bit Excel cannot recover from that issue when opening the afflicted Excel file. The fix was released where you must change a registry entry of Excel.

In addition, from your original post, I believe your Excel version is 1708 (Build 8431.2215). If so, I’ll suggest update Office to the latest version. To know how to install Office updates, please see Install Office updates.

You can check this article about the Office 365 version information.

 

Thanks,

Neha

-----------
•Beware of Scammers posting fake Support Numbers here.
•Please let us know if this is helpful and if the solution worked for you, as it can benefit others who are facing the same scenario.

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi M G 123,


Did you check above reply? Please update us when you have time.

Regards,

Neha

-----------
•Beware of Scammers posting fake Support Numbers here.
•Please let us know if this is helpful and if the solution worked for you, as it can benefit others who are facing the same scenario.

3 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated April 24, 2024 Views 24,375 Applies to: