Reference Object (Access)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

The Reference object refers to a reference set to another application's or project's type library.

When you create a Reference object, you set a reference dynamically from Visual Basic.

The Reference object is a member of the References collection. To refer to a particular Reference object in the References collection, use any of the following syntax forms.

Syntax

Description

References!referencename

The referencename argument is the name of the Reference object.

References("referencename")

The referencename argument is the name of the Reference object.

References(index)

The index argument is the object's numerical position within the collection.

Note Note

The following example refers to the Reference object that represents the reference to the Microsoft Access type library:

Dim ref As Reference 
Set ref = References!Access
Show: