AddTypeLibrary Method (Scripting Object)

Object: Scripting Object

Binds constants (enums) that the specified Type Library defines, into the currently running script.

Usage

Scripting.AddTypeLibrary (ByVal TypeGUIDorProgID As String,
[ByVal MajorVersion As Variant],
[ByVal MinorVersion As Variant]) As Boolean

Arguments

TypeGUIDorProgID

String specifying either a Type Library GUID in the form {8digits-4digits-4digits-4digits-12digits} or a ProgID. For more information about the program IDs, see Program IDs for Applications and Automation Engines.

MajorVersion

(Optional) Parameter specifying the Major version as found in the type library. The default value is 1.

MinorVersion

(Optional) Parameter specifying the Minor version as found in the type library. The default value is 0.

Return Values

Boolean indicating of the method succeeded (True) or failed (False).

Examples

' Use any constants defined in MGCPCB Automation layer 
Call Scripting.AddTypeLibrary("MGCPCB.Application")