Search notes:

VB Editor Object Model: Reference

Two types of reference

A Reference object references either
Thus, adding references to VBA project extends the available functionality for the project with the functionality that is found in the TypeLib or the other project.
The type of a reference object is exposed in its .type property which is assigned one of the two following enumeration values

Adding a reference

A Reference object can be added using the References collection:
….references.addFromGUID(guid, major, minor)
guid refers to a GUID found in the registry under the key HKEY_CLASSES_ROOT\TypeLib.
With the GUI (Visual Basic Editor), a reference can be added with the menu Tools -> References…

See also

The references collection

Index