|
-
Nov 7th, 2002, 02:55 AM
#1
Thread Starter
Member
Searching for text
Right. Good simple question.
Got a textbox, full o' text'ly goodness.
I want to search for, oh lets, say, the word "blah".
in it
If it finds it, returns true,
if not; false.
-and if anyone has some fancy code that will search for similar terms, please, dont hold back.
cheers.
In a world without fences, who needs GATES? The penguins are a comin'!
-
Nov 7th, 2002, 03:01 AM
#2
Like:
VB Code:
If InStr(1, Text1.Text, " blah ", vbTextCompare) <> 0 Then
MsgBox "True"
Else
MsgBox "False"
End If
Using vbTextCompare will look for BLAH or BlAh etc.
Note the Spaces before and after "blah"
-
Nov 7th, 2002, 03:02 AM
#3
If Instr(Text1.text,"mendhak") then
msgbox "Found"
else
msgbox "not there"
end if
-
Nov 7th, 2002, 03:02 AM
#4
Originally posted by Bruce Fox
Like:
VB Code:
If InStr(1, Text1.Text, "blah", vbTextCompare) <> 0 Then
MsgBox "True"
Else
MsgBox "False"
End If
Using vbTextCompare will look for BLAH or BlAh etc.
*takes out shotgun*
-
Nov 7th, 2002, 03:04 AM
#5
LOL
-
Nov 7th, 2002, 03:08 AM
#6
Thread Starter
Member
Cheers guys.
Works like a charm.
In a world without fences, who needs GATES? The penguins are a comin'!
-
Nov 7th, 2002, 03:13 AM
#7
No worries King W,
On behalf of myself and Mendhak; your welcome.
* Hands Mendhak a 12 guage cartridge......
-
Nov 7th, 2002, 03:32 AM
#8

I've lost my touch...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|