AddFromGuid method (VBA Add-In Object Model)
Adds a reference to the References collection by 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 that you want to add. The GUID can be a type library, control, class identifier, and so on.
See also
- Collections (Visual Basic Add-In Model)
- Visual Basic Add-in Model reference
- Visual Basic language reference
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.