InStr (function)

<< Click to Display Table of Contents >>

InStr (function)

InStr(Start, String, SearchString)

Returns the position of the first occurrence of the string SearchString within the string String.

Start is the starting position of the search; use the value 1 to search within the whole string. Start must be a positive integer number.

String is the string expression to be searched.

SearchString is the string expression to search for.

See also: Mid, StrComp

Example:

Sub Main

 B$ = "SoftMaker Basic"

 A = InStr(2, B$, "Basic")

 MsgBox A

End Sub