CorArray: IndexOf

IndexOf

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



 Public Function IndexOf(
	  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 one-dimensional 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 a value of less that the lower-bounds is returned, then the value was not found in the array.

See Also

Project CorLib Overview

Class CorArray Overview

LastIndexOf