Click to See Complete Forum and Search --> : After finding string in textbox, how to....


AndyK
December 15th, 1999, 09:21 PM
After finding string in the textbox, how to tell vb to check characters after that string that was found for example.....vb found "Hello" but the line is "Hello 15" (where 15 can be any number from 1 to 50), how to tell vb to find out that number after "hello" and show it in msgbox...
Thank You

czimmerman
December 15th, 1999, 11:36 PM
Assuming string to find is in variable name sStringtoFind:


dim sValue as string
dim iPos as integer
iPos = inStr(text1.text, sStringtoFind)
sValue = trim(mid(text1.text, iPos + 1))
msgbox sValue




Charlie Zimmerman
http://www.freevbcode.com