VbaProject

VbaProject class

Represents the VBA project.

Properties

NameTypeDescription
NameStringGets and sets the name of the VBA project.
IsSignedbooleanIndicates whether VBAcode is signed or not.
IsProtectedbooleanIndicates whether this VBA project is protected.
ModulesVbaModuleCollectionGets all VbaModule objects.
ReferencesVbaProjectReferenceCollectionGets all references of VBA project.

Methods

NameDescription
protectProtects or unprotects this VBA project.

If islockedForViewing is true, the password could not be null. | | validatePassword | Validates protection password. |

VbaProject.Name property

Gets and sets the name of the VBA project.

Type: String

VbaProject.IsSigned property

Indicates whether VBAcode is signed or not.

Type: boolean

VbaProject.IsProtected property

Indicates whether this VBA project is protected.

Type: boolean

VbaProject.Modules property

Gets all VbaModule objects.

Type: VbaModuleCollection

VbaProject.References property

Gets all references of VBA project.

Type: VbaProjectReferenceCollection

protect(islockedForViewing, password)

Protects or unprotects this VBA project.

If islockedForViewing is true, the password could not be null.

ParameterTypeDescription
islockedForViewingbooleanindicates whether locks project for viewing.
passwordStringIf the value is null, unprotects this VBA project, otherwise protect this VBA project.

validatePassword(password)

Validates protection password.

ParameterTypeDescription
passwordStringthe password

Returns: Whether password is the protection password of this VBA project