Can someone tell me how to create a serch for a textbox. I would also like to use Find Next.
Printable View
Can someone tell me how to create a serch for a textbox. I would also like to use Find Next.
In textbox you can use InStr() function or something like that: (Text1 is a textbox, S1 is what you're searching)
Dim Ind as Integer
Dim S1 as string
for Ind = 1 to len(Text1.Text)
If S1 = mid(Text1.Text, Ind, len(S1)) then
MsgBox mid(Text1.Text, Ind, len(S1))
' here you can add your code
End If
next Ind
Jean Spector
Tech Support Team Leader, CET
[email protected]
(in VB from 11/1999)