Public Function InStrReverse( _ ByVal vStartPos As Variant _ , ByVal vLine As Variant _ , ByVal vFind As Variant _ , Optional ByVal vCompare As Variant _ ) As Variant
InStrReverse(Null, "THIS IS A TEST.", "IS") = 6 InStrReverse(Null, "THIS IS A TEST.", "SAMPLE") = 0See also:
InStrReverseFast Function InStr Function (Visual Basic)vLine: The string which is to be searched from right-to-left for the appearance of string vFind. Function returns Null if vLine is Null or cannot be fixed up to a String.
vFind: The string which is to be searched for within string vLine. Function returns Null if vFind is Null or cannot be fixed up to a String.
vStartPos: The character position in string vLine where the search is to begin. vStartPos defaults to the position of the last character in the string vLine (the length of the line) if it is Null or cannot be fixed up to a number. Even though this function is looking for the last match, it searches forward for the string vFind.
Note: Function returns the starting position vStartPos if vFind is an empty string.
vCompare: Specifies the type of comparison used to determine if the strings match. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.
Function returns 0 (zero) if string vFind does not appear anywhere within string vLine.
v1.5 Note: This function is similar to the new InStrRev function in Visual Basic 6.0, except that the arguments are arranged differently.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.