In the past, I was able to open downloaded .csv files using:
But, now, when it hits .Refresh, I get this MSVB Run-time error:
I'm struggling with finding out what's causing it.
I have compared older .csv files with more recent ones and the only difference is the first column (a date) format YYYY-MM-DD vs. MM/DD/YYY and nothing else (usng Notepad++).
VBA Code:
With TempSheet.QueryTables.Add(Connection:="TEXT;" & savePath, Destination:=TempSheet.Range("A1"))
.TextFileParseType = xlDelimited
.TextFileCommaDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1)
.Refresh
End With
I'm struggling with finding out what's causing it.
I have compared older .csv files with more recent ones and the only difference is the first column (a date) format YYYY-MM-DD vs. MM/DD/YYY and nothing else (usng Notepad++).