If you do not care about finding the position, use the Like operator.
Else, use the InStr function.Code:If String1 Like String2 Then MsgBox "Yes"
Code:nPos = InStr(1, StringToSearch, StringToFind) If nPos > 0 Then MsgBox "String found at position " & nPos




Reply With Quote