Class ExcelVbaProtection
Vba security properties
Inherited Members
Namespace: OfficeOpenXml.VBA
Assembly: EPPlus.dll
Syntax
public class ExcelVbaProtection
Properties
HostProtected
If access to the VBA project was restricted by the VBA host application
Declaration
public bool HostProtected { get; }
Property Value
| Type | Description |
|---|---|
| bool |
UserProtected
If access to the VBA project was restricted by the user
Declaration
public bool UserProtected { get; }
Property Value
| Type | Description |
|---|---|
| bool |
VbeProtected
If access to the VBA project was restricted by the VBA project editor
Declaration
public bool VbeProtected { get; }
Property Value
| Type | Description |
|---|---|
| bool |
VisibilityState
if the VBA project is visible.
Declaration
public bool VisibilityState { get; }
Property Value
| Type | Description |
|---|---|
| bool |
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 |
|---|---|---|
| string | Password | The password |