6.1.2.11.1.15 InStrRev

Function Declaration

 Function InStrRev(StringCheck As String, StringMatch As 
 String, Optional Start As Long = -1, Optional Compare As VbCompareMethod = vbBinaryCompare) As Long 

Parameter

Description

StringCheck

String expression to search.

StringMatch

String expression being searched for.

Start

Long containing a numeric expression that sets the starting position for each search. If omitted, the data value 1 is used, which means that the search begins at the last character position. If Start contains the data value Null, an error occurs.

Compare

Numeric value indicating the kind of comparison to use when evaluating substrings. If omitted, a binary comparison is performed. See the next table in this section for values.

Runtime Semantics.

§ Returns the position of an occurrence of one string within another, from the end of string.

§ The Compare argument can have the following values (if omitted, it uses the <option-compare-directive> of the calling module):

Constant

Value

Description

vbBinaryCompare

0

Performs a binary comparison.

vbTextCompare

1

Performs a textual comparison.

§ InStrRev returns the following values:

If

InStrRev returns

StringCheck is zero-length

0

StringCheck is Null

Null

StringMatch is zero-length

Start

StringMatch is Null

Null

StringMatch is not found

0

StringMatch is found within StringCheck

Position at which match is found

Start > Len(StringMatch)

0