My work have recently upgraded from excel 2003 to 2007 (very progressive!!) and, amongst other problems, I had a macro that imported 2 csv files into an excel workbook that worked fine in 2003 but won't in 2007;
When I run;
Sub Import()
Dim oCSV As Workbook
Set oCSV = Workbooks.Open("F:\WebCCD\ICCQuoteData.csv")
oCSV.Sheets(1).Copy ThisWorkbook.Worksheets(1)
oCSV.Close False
Set oCSV = Workbooks.Open("F:\WebCCD\ICCSaleData.csv")
oCSV.Sheets(1).Copy ThisWorkbook.Worksheets(1)
oCSV.Close False
Set oCSV = Nothing
End Sub
I get a runtime error 1004 at the;
oCSV.Sheets(1).Copy ThisWorkbook.Worksheets(1)
line.
Help please!!??
When I run;
Sub Import()
Dim oCSV As Workbook
Set oCSV = Workbooks.Open("F:\WebCCD\ICCQuoteData.csv")
oCSV.Sheets(1).Copy ThisWorkbook.Worksheets(1)
oCSV.Close False
Set oCSV = Workbooks.Open("F:\WebCCD\ICCSaleData.csv")
oCSV.Sheets(1).Copy ThisWorkbook.Worksheets(1)
oCSV.Close False
Set oCSV = Nothing
End Sub
I get a runtime error 1004 at the;
oCSV.Sheets(1).Copy ThisWorkbook.Worksheets(1)
line.
Help please!!??