Table of contents
Collapse the table of content
Expand the table of content

Item Method (VBA Add-In Object Model)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Returns the indexed member of a collection. Syntaxobject.Item(index) The Item method syntax has these parts:

objectRequired. An object expression that evaluates to an object in the Applies To list.
indexRequired. 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 astring expression, index must correspond to the keyargument specified when the member was added to the collection.

The following table lists the collections and their corresponding key arguments for use with the Item method. The string you pass to the Item method must match the collection's key argument.

CollectionKey argument
WindowsCaption property setting
LinkedWindowsCaption property setting
CodePanesNo unique string is associated with this collection.
VBProjectsName property setting
VBComponentsName property setting
ReferencesName property setting
PropertiesName property setting

Remarks The index argument can be a numeric value or a string containing the title of the object.

Important Objects, properties, and methods for controlling linked windows, linked window frames, and docked windows are included on the Macintosh for compatibility with code written in Windows. However, these language elements will generate run-time errors when run on the Macintosh.

© 2018 Microsoft