Excel crashes in VBE7.DLL running or enabling macro

When attempting to run VBA code in Excel, the following error may be thrown:

“File not found”. When you click OK, the Visual Basic Editor (VBE) shows up and you may have to break out of the code. Or, Excel may just crash with the following error signature:

Faulting application name: EXCEL.EXE, version: 14.0.6117.5003, time stamp: 0x4f622ef8
Faulting module name: VBE7.DLL, version:, time stamp: 0x4e49ae34

The version of Excel may vary as may the version of VBE.DLL

To get past this error there are a couple of things you can do.

Method1 – Recompile the Project

1. Open the workbook in Excel. Normally Excel will disable macros in a worksheet until you click a button to enable the macros. Do not enable the macros just yet.
2. Open the VBA editor. You can hit ALT+F11 or on the ribbon click Developer > Visual Basic
3.  In the VBA editor double click your module or first module that contains your project. Add a commented line of code such as:

‘ This is a comment

Then click on the Debug menu at the top and click Compile VBA Project.

Repeat this step for each module in your workbook and then save the workbook.

4. Close the workbook and re-open it and enable the macros and test it. 

Method 2 – Disable Compile on Demand

In the VBE Editor in Excel, click on Tools > Options > General tab and click to uncheck “Compile on Demand”.

Alternatively you can set the following registry key:

Type:  DWORD
Name:  CompileOnDemand
Value:  0

Comments (8)

  1. kishhr says:

    This kind of stuffs are more to come i request microsoft to provide seperate division on bug and error handling stuffs

  2. Ross says:

    Finally, a solution to the dreaded VBE7.dll Excel has stopped working crash

  3. Mirek says:

    Thank you, it works great!

  4. Zabalero says:

    For me this is not working.
    If I compile, Excel crashes.
    If I disable CompileOnDemand Excel it crashes when opening the file.
    The best part is that this started to happen after updating to Office 2013 Service Pack 1.
    Thanks Microsoft, as usual, for complicating my working day.

  5. PatBriPerso says:

    I have the same issue with Office 2013 under Windows 8. As Zabalero the 2 solutions above does not solved the issue for me.
    I have also Office 2013 under Windows 7 and I do not have the issue.

  6. PatBriPerso says:

    More information: I use Microsoft Office 365 Family Premium
    – under my Windows 8 PC Excel version is Excel 2013 (15.0.4569.1504) MSO (15.0.4569.1506) 32 bits
    – under my Windows 7 PC Excel version is Excel 2013 (15.0.4551.1510) MSO (15.0.4551.1508) 32 bits

  7. EB says:

    this solution don’t work for me.
    There is a big buzz about it on the internet.

    I post here the ONLY solution that I found that helps.
    reffer to the controls like this : YourUserForm.Controls("YourControlName")……..

    and NOT directly like this : Me.CotrolName , OR like this YourUserForm.ControlName

  8. Hannes says:

    Excel 2013 crash is fixed in 3rd May 2016 patch: