I am trying to analyze a String with VBA code. I read a String that looks like that :
myStringInput = "FRAG_INST = someValue,DR = otherValue, FRAG = anotherValue"
And in my code I would like to associate some variable according to the value read in the string, I would like to initialize my variables like that :
Dim dr, frag, fraginst As String
fraginst = someValue
dr = otherValue
frag = anotherValue
I have tried things like Trim/Split/InStr combination but I always ended up with wrong values. I cannot just use "Mid" function because length of the values mays change from one execution to another...
To be clearer, I need to design function like this
fraginst = NiceFunction("FRAG_INST",myStringInput)
and it would return "someValue"
Is there an easy way to do what I want ?
Thanks