String

IanT

Registered User.
Local time
Today, 18:53
Joined
Nov 30, 2001
Messages
191
Hi
I have a string which contains M100652-P633230. What I want to do is pick up each set of text ie M100652 then P633230. Can any one help!
 
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
 
Please don't start new threads on the same topic. Threads merged.
 

Users who are viewing this thread

Back
Top Bottom