InStr(Int32,String,String,CompareMethod) Method
Returns an integer specifying the start position of the first occurrence of one string within another.
Parameters
- start
- Optional. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. The start index is 1-based.
- 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 zero length or Nothing, InStr returns . If is not found, InStr returns 0. If is found within , InStr returns position where match begins. If > , InStr returns 0.