Excel crashes when opening file

ryland00

Board Regular
Joined
Jun 13, 2014
Messages
76
Hello,

I am very confused. My macro was working perfectly opening files and consolidating and now it crashes every time I try to run it on the first line of code.

Code:
Sub PerformAll()
Dim wbSource As Workbook
Dim wbDestination As Workbook
Dim wbSource2 As Workbook
Dim wbDestination2 As Workbook
Dim wbSource3 As Workbook
Dim wbDestination3 As Workbook
Dim wbSource4 As Workbook
Dim wbDestination4 As Workbook
Dim wbSource5 As Workbook
Dim wbDestination5 As Workbook
Dim wbSource6 As Workbook
Dim wbDestination6 As Workbook




Application.DisplayAlerts = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual




'open the source workbook and select the source sheet for India
Set wbSource = Workbooks.Open( _
    Filename:=Sheets("Internal Instructions").Range("C11").Value & "\INDIA Monthly Financial Report FY18 Sep-17.xlsm")

where c11 contains the path : C:\Users\rland\Desktop\Test



I just don't understand what changed! Any help would be great.

Thanks!
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

tonyyy

Well-known Member
Joined
Jun 24, 2015
Messages
1,647
Or could it be the file you're trying to open - INDIA Monthly Financial Report FY18 Sep-17.xlsm - contains a Workbook_Open event that causes your macro to crash?

Cheers,

tonyyy
 

Forum statistics

Threads
1,089,202
Messages
5,406,813
Members
403,106
Latest member
AliO

This Week's Hot Topics

Top