Help required with strings resolved
Cant believe 'm stuck with this.
My string is contained within a variable. I want to know if the string contains abc. the location of abc may change or it may not even be there.
If the variable contains abc I want my next variable to contain abc and the next 6 characters to the right.
I can check if the variable contains abc and I can get the position of the a but I cant work out how to get the abc and the next 8 characters.
Please can you help? This is what I have
thank you
smiler44
Cant believe 'm stuck with this.
My string is contained within a variable. I want to know if the string contains abc. the location of abc may change or it may not even be there.
If the variable contains abc I want my next variable to contain abc and the next 6 characters to the right.
I can check if the variable contains abc and I can get the position of the a but I cant work out how to get the abc and the next 8 characters.
Please can you help? This is what I have
Code:
Dim pos As Integer
dim asg as string
dim varytwo as string
asg = "the aplpabet abcdefghi is the first 9 letters"
pos = InStrRev(asg, "abc")
vary2 = ? ' this is where I am stuck
smiler44
Last edited: