Reference Object

Microsoft Access Visual Basic

Reference Object

         
References Reference
References

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

Using the Reference Object

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.

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