VbaProjectReferenceCollection

VbaProjectReferenceCollection class

Represents all references of VBA project.

class VbaProjectReferenceCollection;

Methods

MethodDescription
get(number)Get the reference in the list by the index.
addRegisteredReference(string, string)Add a reference to an Automation type library.
addControlRefrernce(string, string, string, string)Add a reference to a twiddled type library and its extended type library.
addProjectRefrernce(string, string, string)Adds a reference to an external VBA project.
copy(VbaProjectReferenceCollection)Copies references from other VBA project.
getCount()Gets the number of elements contained in.

get(number)

Get the reference in the list by the index.

get(i: number) : VbaProjectReference;

Parameters:

ParameterTypeDescription
inumberThe index.

Returns

VbaProjectReference

addRegisteredReference(string, string)

Add a reference to an Automation type library.

addRegisteredReference(name: string, libid: string) : number;

Parameters:

ParameterTypeDescription
namestringThe name of reference.
libidstringThe identifier of an Automation type library.

addControlRefrernce(string, string, string, string)

Add a reference to a twiddled type library and its extended type library.

addControlRefrernce(name: string, libid: string, twiddledlibid: string, extendedLibid: string) : number;

Parameters:

ParameterTypeDescription
namestringThe name of reference.
libidstringThe identifier of an Automation type library.
twiddledlibidstringThe identifier of a twiddled type library
extendedLibidstringThe identifier of an extended type library

addProjectRefrernce(string, string, string)

Adds a reference to an external VBA project.

addProjectRefrernce(name: string, absoluteLibid: string, relativeLibid: string) : number;

Parameters:

ParameterTypeDescription
namestringThe name of reference.
absoluteLibidstringThe referenced VBA project’s identifier with an absolute path.
relativeLibidstringThe referenced VBA project’s identifier with an relative path.

copy(VbaProjectReferenceCollection)

Copies references from other VBA project.

copy(source: VbaProjectReferenceCollection) : void;

Parameters:

ParameterTypeDescription
sourceVbaProjectReferenceCollectionThe source references.

getCount()

Gets the number of elements contained in.

getCount() : number;