6.1.3.1.1.2 Item

Function Declaration

 Function Item(Index As Variant) As Variant 

Parameter

Description

Index

An expression that specifies the position of a member of the collection. If a numeric expression, Index MUST be a number from 1 to the value of the collection's Count property. If a string expression, Index MUST correspond to the Key argument specified when the member referred to was added to the collection.

Runtime Semantics.

§ Returns a specific member of a Collection object either by position or by key.

§ If the value provided as Index does not match any existing member of the collection, an error occurs.

§ The Item method is the default method for a collection. Therefore, the following lines of code are equivalent:

Print MyCollection(1)

Print MyCollection.Item(1)