Item

The Item method returns an individual item from a collection. This is the default method of Documents, Shapes, Layers, and Windows collections.

 

Syntax

object.Item( Index )

 

Parameter

Type

Description

Index

Variant

required; see remarks

 

Remarks

The Index parameter is defined as follows:

 

Example

This example demonstrates how to return the names of the windows.

 

'Add two documents

 mvApp.Documents.Add mvDocPlot ' Create a new, blank map document

 mvApp.Documents.Add mvDocWks ' Create a new, blank worksheet document

 

'Declares Docs as an object

 Dim Docs As Object

 

'Assigns the Windows collection to the variable named "Win"

 Set Win = mvApp.Windows

 

 Debug.Print Win.Item(Index:=1)

 Debug.Print Win.Item(Index:=2)

 

Used by: Documents collection, Layers collection, Shapes collection, Windows collection