VbaProject.Protect

VbaProject.Protect method

Protects or unprotects this VBA project.

public void Protect(bool islockedForViewing, string password)
ParameterTypeDescription
islockedForViewingBooleanindicates whether locks project for viewing.
passwordStringIf the value is null, unprotects this VBA project, otherwise projects the this VBA project.

Remarks

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

See Also