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
-
vbext_rk_typeLib (= 0)
-
vbext_rk_project (= 1)
Adding a reference
A Reference object can be added using the References collection:
….references.addFromGUID(guid, major, minor)