B
Bob Howard
I have need to read in a text file containing tab-delmited fields. How do I
parse this gaining access to each individual data field and giving each a
variable name in the code (such as strName, strAddressLine1, etc.)?
Some fields are optional and simply represented by their tab character if in
the middle of the line. All trailing tabs on optional fields are omitted.
The first field (name) is required.
For example:
Name1<tab>Address line 1<tab><tab>City<tab>State<tab>ZIP
Name2<tab>Address line 1<tab>Address line 2<tab>City<tab>State<tab<ZIP
Name3
....
....
....
etc.
Note the first record has no "Address Line 2" but its tab character is
present.
Note the second record has data in all fields.
Note the third record has just one field and all the rest are missing but
not represented by tabs.
Is there any caned VBA to help me on this???
Thanks in advance!
Bob (@Martureo.Org)
parse this gaining access to each individual data field and giving each a
variable name in the code (such as strName, strAddressLine1, etc.)?
Some fields are optional and simply represented by their tab character if in
the middle of the line. All trailing tabs on optional fields are omitted.
The first field (name) is required.
For example:
Name1<tab>Address line 1<tab><tab>City<tab>State<tab>ZIP
Name2<tab>Address line 1<tab>Address line 2<tab>City<tab>State<tab<ZIP
Name3
....
....
....
etc.
Note the first record has no "Address Line 2" but its tab character is
present.
Note the second record has data in all fields.
Note the third record has just one field and all the rest are missing but
not represented by tabs.
Is there any caned VBA to help me on this???
Thanks in advance!
Bob (@Martureo.Org)