Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21839

help search exact string

$
0
0
I have the code below

Code:

Private Sub FindText(ByVal start_at As Integer)
Dim pos As Integer
Dim target As String

    target = LCase(Text1.Text)
    pos = InStr(start_at, findtext.text, target, vbTextCompare)
    If pos > 0 Then
        bool = True
    Else
        bool = False
    End If
End Sub



if I search like i want to search the word "terminate" and I will only enter the word "ate", it will still find "terminate" which I want to search by exact search criteria. so if I type "ate", it will not give me "terminate".

.

Viewing all articles
Browse latest Browse all 21839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>