How to search a word in a block of text

Simon4VB

Member
Joined
Apr 2, 2009
Messages
23
Programming Experience
1-3
May I ask the code as follows please,
I have a;
a multiline txtbox1
a btn1
a normal txtbox2

I have a block of text in the txtbox1. I wish to input a word in txtbox2 and press btn1 and it searches the word in txtbox1 and a msg shows ez:word found.

Thanks very much to all.
 
Last edited:
U can use 'Contains'.
VB.NET:
If txtbox1.Text.Contains(txtbox2.Text) Then
 Msgbox (txtbo2.Text & " Found !!")
End If
 
Back
Top