VbaProject class

VbaProject class

Represents the VBA project.

The VbaProject type exposes the following members:

Properties

PropertyDescription
is_valid_signedIndicates whether the signature of VBA project is valid or not.
cert_raw_dataGets certificate raw data if this VBA project is signed.
encodingGets and sets the encoding of VBA project.
nameGets and sets the name of the VBA project.
is_signedIndicates whether VBAcode is signed or not.
is_protectedIndicates whether this VBA project is protected.
islocked_for_viewingIndicates whether this VBA project is locked for viewing.
modulesGets all VbaModule objects.
referencesGets all references of VBA project.

Methods

MethodDescription
signSign this VBA project by a DigitalSignature
protectProtects or unprotects this VBA project.
copyCopy VBA project from other file.
validate_passwordValidates protection password.

Example

from aspose.cells import Workbook

# Instantiating a Workbook object
workbook = Workbook()
#  Init VBA project.
vbaProject = workbook.vba_project
# Saving the Excel file
workbook.save("book1.xlsm")

See Also