I love continuity!

Thanks Dave. I have 22 columns to bring in, now my understanding is that if
I create an array like

Dim ColumnFormats(1 To 22, 1 To 2) As Variant

Then put 1 to 22 in position 1 column 1 (using option base 1) and then
xlTextFormat, or xlSkipColumn (or whatever is required) in column 2 for the
relevant position and then include FieldInfo:=ColumnFormats in the parameter
list

Then it should all work, or have I got myself confused?

Regards,


"Dave Peterson" wrote:

> When VBA (not excel) sees that *.csv filename, it ignores your fieldinfo stuff.
>
> If you rename your .csv to .txt (or almost anything else), then your macro will
> work ok.
>
>
>
> SB wrote:
> >
> > Hi,
> >
> > I am struggling to understand the FieldInfo parameter in the
> > Workbooks.OpenText method. I have a csv file that I am opening, I have no
> > problem dumping the whole file into a sheet but when I try to use the
> > FieldInfo parameter to specify which columns to ignore and which should be
> > treated as text (to preserve a leading 0) I get lost. Can anyone point me to
> > a worked example or the like, or explain to me in laymans terms how to go
> > about it?
> >
> > Regards,

>
> --
>
> Dave Peterson
>