Visual Basic Reference

Visual Studio 6.0

Index Property (ActiveX Controls)

See Also   Example   Applies To

Returns or sets the number that uniquely identifies an object in a collection.

Syntax

object.Index

The object placeholder is an object expression that evaluates to an object in the Applies To list.

Remarks

The Index property is set by default to the order of the creation of objects in a collection. The index for the first object in a collection will always be one (1).

The value of the Index property of an object can change when objects in the collection are reordered, such as when you set the Sorted property to True. If you expect the Index property to change dynamically, it may be more useful to refer to objects in a collection by using the Key property.

Show: