Show / Hide Table of Contents

Class ProtectionState

Vba security properties

Inheritance
System.Object
ProtectionState
Namespace: DRIT.Spreadsheet.Vba
Assembly: DRIT.Spreadsheet.dll
Syntax
public class ProtectionState : object

Properties

HostProtected

Specifies whether access to the VBA project was restricted by the VBA host application

Declaration
public bool HostProtected { get; }
Property Value
Type Description
System.Boolean

UserProtected

Specifies whether access to the VBA project was restricted by the user

Declaration
public bool UserProtected { get; }
Property Value
Type Description
System.Boolean

VbeProtected

Specifies whether access to the VBA project was restricted by the VBA project editor

Declaration
public bool VbeProtected { get; }
Property Value
Type Description
System.Boolean

VisibilityState

Specifies whether the VBA project is visible.

Declaration
public bool VisibilityState { get; }
Property Value
Type Description
System.Boolean

Methods

SetPassword(String)

Password protect the VBA project. An empty string or null will remove the password protection

Declaration
public void SetPassword(string Password)
Parameters
Type Name Description
System.String Password

The password

Back to top Generated by DocFX