Split Data
I am trying to use this code to identify data from a table like 'M123456~K456789'. Split the string then look for a association in another set of data using each string. Unfortunatly this is not working, can anyone help!
Case "BunzlHousekeeping"
Set objActivity = rs("GoldmineAccountNumber")
Set objActCode = rs("Bunzl")
'The Split Function will return an array to the variant
varMyVariantArray = Split(objActCode, "~")
'Loop thru the array elements & build a string
For i = 0 To UBound(varMyVariantArray)
objActCode = varMyVariantArray(i)
Do While Not rs.EOF
If AccountNumber = objActCode Then
Account_Number = objActivity
End If
rs.MoveNext
Loop
Next
objActCode = Nothing