import-a-text-file-2

Nick's picture
import-a-text-file-2


Screen shot 2 of VBA Tips - Import A Text File

Follow this link for whole Excel Tip on how to Import A Text File

comma delimited

Thankyou so much for this tutorial, but what if the .txt file is comma delimited ? I've been trying to work on this.. Please help !

Workbooks.OpenText

Workbooks.OpenText Filename:="C:\myfile.txt", Origin _
:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=False