VB Code:
Option Explicit
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub Command1_Click()
Dim start As Double, test As String
test = test & String(25000000, "7")
test = test & "!"
start = GetTickCount
Debug.Print "instr no compare method: " & InStr(1, test, "!")
Debug.Print "instr no compare method: " & GetTickCount - start
start = GetTickCount
Debug.Print "instr binary compare: " & InStr(1, test, "!", vbBinaryCompare)
Debug.Print "instr binary compare: " & GetTickCount - start
start = GetTickCount
Debug.Print "instr text compare: " & InStr(1, test, "!", vbTextCompare)
Debug.Print "instr text compare: " & GetTickCount - start
start = GetTickCount
Debug.Print "like: " & test Like "*!*"
Debug.Print "like: " & GetTickCount - start
End Sub