CorArray: LastIndexOf

LastIndexOf

Returns the index of the last occurrence of a value in a one-dimensional Array or in a portion of the Array.



 Public Function LastIndexOf(
	  ByRef Arr As Variant,
	  ByRef Value As Variant,
	  Optional ByRef StartIndex As Variant,
	  Optional ByRef Count As Variant ) As Long

Parameters

Arr
[ByRef] Variant. The array to search.
Value
[ByRef] Variant. The value to search for in the array.
StartIndex
[ByRef] Optional. Variant. The index to the element in the array to begin search from.
Count
[ByRef] Optional. Variant. The number of elements to search, starting from startindex.

Return Values

Long -  Value indicating the index the value was found. If no value was found, then one less than the lower bound of the array is returned.

See Also

Project CorLib Overview

Class CorArray Overview

IndexOf