Item Method (ADO MD Collection)

      Applies To   

The Item method retrieves an item from a collection by name or ordinal number.

Syntax

Set Object = Collection.Item ( Index )

Parameters

Index   Variant that evaluates to either the string containing the name or the ordinal number of an object in the collection.

Remarks

Use the Item method to return a specific object in a collection. If the method cannot find an object in the collection corresponding to the Index argument, an error occurs. Also, some collections do not support named objects; for these collections, you must use ordinal number references.

The Item method is the default method for all collections. The following syntax forms are interchangeable:

Collection.Item ( Index )

Collection ( Index )