Error Message regarding .TextFilePlatform = 437
I've written a macro with a getDirectory(StrPath) so that the user can choose
where to get the txt file to import from. The problem is that it works fine
on my PC as well as a laptop but for some reason don't work on a workstation
where I tried to implement the code.
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;" & StrPath, Destination _
:=Range("A1"))
.Name = "SeeName"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = True
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1,
1, 9)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Can someone please help me to correct this so that I can implement the
application on any machine.
|