InStr(String,String,CompareMethod) Method
In This Topic
Returns an integer specifying the start position of the first occurrence of one string within another.
Syntax
Parameters
- string1
- Required. String expression being searched.
- string2
- Required. String expression sought.
- compare
- Optional. Specifies the type of string comparison. If is omitted, the Option Compare setting determines the type of comparison.
Return Value
If is zero length or Nothing, InStr returns 0. If is not found, InStr returns 0. If is found within , InStr returns position where match begins.
See Also