References.Item method (Access)
The Item method returns a specific member of a collection either by position or by key. Reference object.
Syntax
expression.Item (var)
expression A variable that represents a References object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
var | Required | Variant | An expression that specifies the position of a member of the collection. If a numeric expression, the var argument must be a number from 1 to the value of the collection's Count property. If a string expression, the var argument must be the name of a member of the collection. |
Return value
Reference
Remarks
If the value provided for the var argument doesn't match any existing member of the collection, an error occurs.
The Item method is the default member of the References collection, so you don't have to specify it explicitly. For example, the following two lines of code are equivalent.
Debug.Print References(1).Name
Debug.Print References.Item(1).Name
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.