Item Method

Item Method

         Example         Applies To        

Returns a member of a collection, either by position or by name.

Syntax

Set Object = object.Item( collectionindex)

The Item method syntax has these parts:

Part Description
object Required. A valid object.
collectionindex Required. A member's position, or index, within a collection.

Settings

The collectionindex can be either a string or an integer. If it is a string, it must be a valid member name. If it is an integer, the minimum value is 0 and the maximum value is one less than the number of items in the collection.

Remarks

If an invalid index or name is specified, an error occurs.