VbaProjectReference class

VbaProjectReference class

Represents the reference of VBA project.

The VbaProjectReference type exposes the following members:

Properties

PropertyDescription
typeGets the type of this reference.
nameGets and sets the name of the reference.
libidGets and sets the Libid of the reference.
twiddledlibidGets and sets the twiddled Libid of the reference.
extended_libidGets and sets the extended Libid of the reference.
relative_libidGets and sets the referenced VBA project’s identifier with an relative path.

Methods

MethodDescription
copy

Example

from aspose.cells import Workbook

# Instantiating a Workbook object
workbook = Workbook()
#  Init VBA project.
vbaProject = workbook.vba_project
#  Add vba project reference
vbaProject.references.add_registered_reference("stdole", "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation")
# Saving the Excel file
workbook.save("book1.xlsm")

See Also