Hi,
I am using Excel 2007, and have used a daily CSV import routine for the last 6 years on Win 7 and 8.1 with no problems.
Since the PC updated to Win 10 (I didn't mean to, but pressed wrong button!) it has failed during the import routine at the TextFilePlatform line, with an Invalid Procedure Call error.
I have tried using different codepage values e.g. 850 instead of 437, but still get same error message.
Any ideas
Thanks
I am using Excel 2007, and have used a daily CSV import routine for the last 6 years on Win 7 and 8.1 with no problems.
Since the PC updated to Win 10 (I didn't mean to, but pressed wrong button!) it has failed during the import routine at the TextFilePlatform line, with an Invalid Procedure Call error.
Code:
With Worksheets("Temp").QueryTables.Add(Connection:=connectionName, Destination:=Worksheets("Temp").Range("A" & Lastrow))
.Name = filename
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
[b].TextFilePlatform = 437[/b]
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.Refresh BackgroundQuery:=False
End With
I have tried using different codepage values e.g. 850 instead of 437, but still get same error message.
Any ideas
Thanks