P
palto1
Hello, I have a field [InjuryType] that contains a string
of values (i.e. 2;5;7;3, etc) separated by ";". I need to
split this field into separate fields so that there is a
new record for each value.
Someone on another newsgroups suggested the following code:
Function ParseandImportInjuryTypes()
Dim ParseString() As String
Dim SourceString As String
SourceString = ExcelLegalFactorsCapEarly.InjuryType
ParseString = Split(SourceString, ";", vbTextCompare)
MsgBox ParseString(0), "1st element of the array"
However, when I compile and run the code, I get an error
on the line the following line: SourceString =
ExcelLegalFactorsCapEarly.InjuryType. The error states
that an Object is required.
What am I doing wrong?
Thank you so much for your help.
of values (i.e. 2;5;7;3, etc) separated by ";". I need to
split this field into separate fields so that there is a
new record for each value.
Someone on another newsgroups suggested the following code:
Function ParseandImportInjuryTypes()
Dim ParseString() As String
Dim SourceString As String
SourceString = ExcelLegalFactorsCapEarly.InjuryType
ParseString = Split(SourceString, ";", vbTextCompare)
MsgBox ParseString(0), "1st element of the array"
However, when I compile and run the code, I get an error
on the line the following line: SourceString =
ExcelLegalFactorsCapEarly.InjuryType. The error states
that an Object is required.
What am I doing wrong?
Thank you so much for your help.