VBE7.dll crash when macro opens another workbook

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
801
Office Version
  1. 365
Platform
  1. Windows
Getting a really frustrating crash, which is happening -every- time a macro opens another workbook.

The workbook hasn't changed in name, type or anything since yesterday when it was working.

It was working yesterday, Tuesday, Monday, all last week and every day before that. Today, it crashes my excel when the macro goes to open this workbook using the following code:

Code:
If ahopen <> True ThenApplication.DisplayAlerts = False
[B]Set ah = Workbooks.Open("\\chw-dc03\company\Sales\Regional Press Selections\" & wbyr & "\Automation Hub.xlsm", False, False)[/B]
Application.DisplayAlerts = True
Else
ah.Activate
End If

On the bolded line, it immediately crashes my excel when it is ran.

Anyone got any ideas? Thanks.

EDIT:

This workbook itself crashes when I open it from Windows Explorer. VBE7.dll

Code:
Problem signature:  Problem Event Name:	APPCRASH
  Application Name:	EXCEL.EXE
  Application Version:	14.0.6024.1000
  Application Timestamp:	4d83e39d
  Fault Module Name:	VBE7.DLL
  Fault Module Version:	7.0.16.19
  Fault Module Timestamp:	4d430b79
  Exception Code:	c0000005
  Exception Offset:	00000000000a9b03
  OS Version:	6.1.7601.2.1.0.256.48
  Locale ID:	2057


This is actually a problem that happens periodically on different workbooks that have Macros in them, we have to restore from a backup file to get them to work again.
 
Last edited:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Here is an absolutely ridiculous fix. It doesn't solve the root problem, but it does fix the broken file:


  1. Disable macros via, Options > Trust Center > Trust Center Settings > Macro Settings > Disable all Macros
  2. Open problematic spreadsheet. Ignore message to enable Macros
  3. Add a new Worksheet to the spreadsheet, save and then close spreadsheet.
  4. Enable macros via, Options > Trust Center > Trust Center Settings > Macro Settings > Enable all Macros
  5. Open problematic spreadsheet
  6. Execute macro to test

Honestly, I find this completely ridiculous. The file is so broken it cannot be opened with Macros enabled. I tried everything else, new updates from August 2018 to Excel, regedit changes etc, none worked. I did this and it worked. I can't explain it.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top