Partager via


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

See Also

Concepts

References Collection

References Object Members