Question : Using Split in VB

I have a string I am splitting using the VB command Split(strname, ",").  However one of the fields has a (,) in it so it is splitting at that point to an additional field.  I do not want it to split at that point but keep it part of the full field.  Is there any way around this that could be suggested?

Thanks.

Answer : Using Split in VB

Here is basic technique:
1. remove leading and trailing quote character
2. replace quote-comma-quote sequence with an ascii 0 char
3. split using ascii 0 as delimiter



dim str as string
dim str_array() as string

str = "111111111","1","","","","Smith","John","S","","","D.C., FPPS","","","","","123 S St."

str = mid(str,2,len(str)-2)
str = replace(str, """,""",chr(0))

str_array = split(str,chr(0))

Random Solutions  
 
programming4us programming4us