• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class ProtectionState

Vba security properties

Inheritance
object
ProtectionState
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Document.Vba
Assembly: DRIT.Document.dll
Syntax
public class ProtectionState

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
bool

IsPasswordProtected

Specifies whether the project currently has password protection metadata.

Declaration
public bool IsPasswordProtected { get; }
Property Value
Type Description
bool

IsUnlocked

Specifies whether the project is currently unlocked for this in-memory instance.

Declaration
public bool IsUnlocked { get; }
Property Value
Type Description
bool

UserProtected

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

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

VbeProtected

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

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

VisibilityState

Specifies whether the VBA project is visible.

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

Methods

Lock()

Locks the project for this in-memory instance.

Declaration
public void Lock()

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
string Password

The password

TryUnlock(string)

Attempts to unlock the project for this in-memory instance.

Declaration
public bool TryUnlock(string password)
Parameters
Type Name Description
string password
Returns
Type Description
bool

VerifyPassword(string)

Verifies a password against the persisted protection metadata. This method has no side effects.

Declaration
public bool VerifyPassword(string password)
Parameters
Type Name Description
string password
Returns
Type Description
bool
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX