I am getting an error because some times the data contains only 2 commas,
because the code is looking for 3. I am sure there is a better way to do
what
I am doing, just have not found one that works yet.
Basically I am extracting this data from a legacy order entry system. I
need
to take the data and parse it into 6 columns. (The 6th column of data is
not
consistent on every line, sometimes there is data and other times its
null).
Description Fld
CC, 4.5 x 5 x 7, C2
CC, 4 x 5 x 7, C2
PB, 5.5 x 5.5 x 8, C2, ModelName
CC, 6 x 5 x 7, C6
I am taking this data and parsing it into 5-6 columns:
Fld1
Fld2
Fld3
Fld4
Fld5
Fld6
As you can see by my sample data, sometimes I have the modelName (Fld6)
and
sometimes I do not.
I can control to some extent how the data is given to me. Meaning comma's,
the X and etc. I was trying to make it easier for our Order Entry person
to
not have to enter the Model name on every order if it was a standard type.
Any help you can give me would be appreciated.
Matt
It would help to know what error message you're getting, but the End If is
definitely wrong and should be removed.
Public Function ParseData(pstrText As String, _
pintColumn As Integer) As String
[quoted text clipped - 40 lines]
--
Matt Campbell
mattc (at) saunatec [dot] com
Message posted via AccessMonster.com