Item Method

Applies To   References collection.

Description

The Item method returns a specific member of a collection either by position or by key.

Syntax

object.Item(index)

The Item method has the following arguments.

Argument

Description

object

The References collection.

index

An expression that specifies the position of a member of the collection referred to by the object argument. If a numeric expression, the index argument must be a number from 1 to the value of the collection's Count property. If a string expression, the index argument must be the name of a member of the collection.


Remarks   If the value provided for the index argument doesn't match any existing member of the collection, an error occurs.

The Item method is the default member of the References collection, so you don't have to specify it explicitly. For example, the following two lines of code are equivalent:

Debug.Print References(1).Name
Debug.Print References.Item(1).Name
See Also

Count property, References collection.