|
-
Aug 24th, 2000, 01:24 AM
#1
Thread Starter
Frenzied Member
I am just wondering this because i use code similar to this pretty often. I wonder if there is a faster way to do this. Usually this is okay, but sometimes, instead of a text box, it loops thru 1000 or more strings in a variable array, and is a bit slow.
------------------------------------------------------
Command1_Click
intLength = Len(Text2.Text)
intLength2 = Len(Text1.Text)
If intLength > intLength2 Then Exit Sub
intDifference = intLength2 - intLength
For intNumTimes = 0 To intDifference
strPart = Mid(Text1.Text, intNumTimes + 1, intLength2)
If strPart = Text2.Text Then
MsgBox("String Found")
Exit Sub
End If
Next intLoop
MsgBox("String Not Found")
End Sub
--------------------------------------------------------
Any thoughts?
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
|