L
Legacy 367316
Guest
I have 3 different workbooks that I'm working with. 2 of the workbooks are reports that are automatically saved to a random temporary internet file folder. I was wondering if I can somehow activate the 2 workbooks without knowing the file path since they will saved to a random folder every time a report is run. I want to take the data from the 2 folders and extract it to the 3rd workbook. This is what I have so far: I keep getting error Run-time error '9': subscript out of range
Sub Macro3()
'
' Macro3 Macro
'
Windows("Report1_FileName").Activate
Sheets("Sheet1").Select
Range("A30:J1000").Select
Selection.Copy
Windows("Root File.xlsm").Activate
Sheets("Sheet1").Select
Range("A1").Select
ActiveSheet.Paste
Sheets.Add After:=Sheets(Sheets.Count)
Windows("Report2_FileName").Activate
Sheets("Sheet1").Select
Range("A1:T1000").Select
Selection.Copy
Windows("Root File.xlsm").Activate
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
End Sub
Sub Macro3()
'
' Macro3 Macro
'
Windows("Report1_FileName").Activate
Sheets("Sheet1").Select
Range("A30:J1000").Select
Selection.Copy
Windows("Root File.xlsm").Activate
Sheets("Sheet1").Select
Range("A1").Select
ActiveSheet.Paste
Sheets.Add After:=Sheets(Sheets.Count)
Windows("Report2_FileName").Activate
Sheets("Sheet1").Select
Range("A1:T1000").Select
Selection.Copy
Windows("Root File.xlsm").Activate
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
End Sub