Visual Basic Extensibility Reference

AddFromGuid Method

See Also Example Applies To Specifics

Adds a reference to the References collection using the globally unique identifier (GUID) of the reference.

Syntax

object.AddFromGuid(guid, major, minor)As Reference

The AddFromGuid syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
guid Required. A string expression representing the GUID of the reference.
major Required. A Long specifying the major version number of the reference.
minor Required. A Long specifying the minor version number of the reference.

Remarks

The AddFromGuid method searches the registry to find the reference you want to add. The GUID can be a type library, control, class identifier, and so on.