Link to home
Start Free TrialLog in
Avatar of Amfab Steel
Amfab Steel

asked on

Random 64-bit Excel 2013 VBA crashes (VBE7.dll errors)

Where do I begin... At work we use a pretty complex macro-enabled spreadsheet to do estimates using imported data. Recently the data for these jobs has become large enough to require 64-bit Excel. This is when we started having issues. We're using the same exact template of the spreadsheet as we did with 32-bit Excel, where it worked fine. The error that appears in the Application Event log always involves VBE7.dll:

Faulting application name: EXCEL.EXE, version: 15.0.4737.1000, time stamp: 0x558018bb
Faulting module name: VBE7.DLL, version: 0.0.0.0, time stamp: 0x54d13f31
Exception code: 0xc0000005
Fault offset: 0x00000000000ee686
Faulting process id: 0x12e4
Faulting application start time: 0x01d0ca20bac9fb9f
Faulting application path: C:\Program Files\Microsoft Office 15\Root\Office15\EXCEL.EXE
Faulting module path: C:\Program Files\Common Files\Microsoft Shared\VBA\VBA7.1\VBE7.DLL
Report Id: 703aa081-3628-11e5-82e4-3417ebb6749a
Faulting package full name:
Faulting package-relative application ID:

Open in new window


It occurs upon enabling macros, even if the spreadsheet was working fine before the previous save. Once the crash occurs, it will crash every time macros are enabled on any PC. The only way to "fix" it is to open it without macros and re-compile the VB code (via Developer tab > Visual Basic > Debug > Compile) and re-save. The data in the spreadsheet seems to be unaffected by the corruption, only the VB portion is somehow is affected.

After several weeks of testing we can reproduce it on several machines running 64-bit Excel by simply doing the following:

1.

Open a good version of the spreadsheet

2.

Enable Macros

3.

Breathe a sigh of relief

4.

Don't change a thing and Save it

5.

Repeat until crash occurs (usually 3-4 times)
It seems to happen regardless of whether the file is local or on a network drive. Excel is completely closed (as verified by task manager) between each open / close cycle. As I said, once the crash / corruption occurs, it crashes every single time macros get enabled until we re-compile. The PC's we've reproduced it on all have plenty of resources to spare when it occurs.

We've tried full online repairs of Office... fresh installs on a fresh system (no plugins)... Any ideas?
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

At these hard cases there is only one way to at least get a clue of what is happening and why...
Get a newly formatted machine...load it with absolutely the bare minimum...if it works then you know that something is responsible for the crash...this could very from a mistaken permission in a registry key to a driver utility ...
If the problem insists even with the bare minimum then the last resort is Process Monitor
Look to the the thousands of entries to try to isolate the problematic ones...anything that doesn't resemble "success" or "found" is probably the offending one....rule out also standard windows processes and again keep everything bare minimum...no antivirus,no extra from the Mainboard CD....just the required drivers and Office...not even your beloved PDF printer (you can't imagine what kind of trouble i faced due to a "problematic" PDF printer....it just "killed" ERP)
Avatar of Amfab Steel
Amfab Steel

ASKER

Thanks for the comment John. We have reproduced this problem on a fresh install of Windows/Excel. The issue is definitely related to the amount of data in the template as we do not have the problem with smaller data-sets. I have found that a lot of others are having similar issues with 64bit Excel and have tried every solution with no luck. Looks like we will have to open an incident with Microsoft.
There is also a good chance that you have some objects that don't release memory properly...
Look in your code for objects that are set but not destroyed after the operations (e.g. recordsets)
Have you verified the workbook has not picked up some extraneous garbage along the way?
I've noticed an Excel crashes tends to add some extra workbook objects to the book.
A particularly nasty one, in my experience, has been the "Thisworkbook1" object.
Also the Sheetxx objects which have the same icon as the Thisworkbook object.

My problems have been with workbooks which originated in older Excel versions. (some of mine go back to the Windows 95 era) To date I have not had any problems with new workbooks created in my present environment.

Another source of crashes, which started occurring when I started running Excel on a 64bit processor (though not necessarily Excel 64 bit), has been Conditional Formatting rules that are no longer valid, have a #Ref in the refers to address.
ASKER CERTIFIED SOLUTION
Avatar of Amfab Steel
Amfab Steel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.