logandiana
Board Regular
- Joined
- Feb 21, 2017
- Messages
- 107
I am opening a CSV that is in the same folder as the macro workbook.
I am getting an error on the Workbooks.Open line
If I hit debug the file opens and the code continues.
I can throw an On Error Resume Next in there and that solves it, but what is causing the error in the first place?
I am getting an error on the Workbooks.Open line
If I hit debug the file opens and the code continues.
I can throw an On Error Resume Next in there and that solves it, but what is causing the error in the first place?
Code:
Dim ISPC, Export As Workbook
Dim Data, Export2 As Worksheet
Sub DoStuff()
Set ISPC = ThisWorkbook
Set Data = ISPC.Worksheets("Data")
Set Export = Workbooks.Open(ActiveWorkbook.Path & "\SalesReport.csv")
Set Export2 = Export.Worksheets(Sheet1)