protect

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.