Hi,
I need to import a text file with this codes, but with some changes to it, like from column A to F as Genaral and Column G as Text.
I have attached the sample text file.
FileToOpen = Application.GetOpenFilename("Text Files (*.txt), *.txt")
s = Split(FileToOpen, "\")
t = Split(s(UBound(s)), ".")
If FileToOpen = "False" Then Exit Sub
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;" & FileToOpen, Destination:=Range("$A$" & LastRow))
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, xlTextFormat)
.Refresh BackgroundQuery:=False
End With
Bookmarks