Partager via


References.AddFromGuid Method (Access)

The AddFromGUID method creates a Reference object based on the GUID that identifies a type library. Reference object.

Syntax

expression .AddFromGuid(Guid, Major, Minor)

expression A variable that represents a References object.

Parameters

Name

Required/Optional

Data Type

Description

Guid

Required

String

A GUID that identifies a type library.

Major

Required

Long

The major version number of the reference.

Minor

Required

Long

The minor version number of the reference.

Return Value

Reference

Remarks

The GUID property returns the GUID for a specified Reference object. If you've stored the value of the GUID property, you can use it to re-create a reference that's been broken.

Example

The following example re-creates a reference to the Microsoft Scripting Runtime version 1.0, based on its GUID on the user's system.

References.AddFromGuid "{420B2830-E718-11CF-893D-00A0C9054228}", 1, 0

See Also

Concepts

References Object Members

References Collection