[]
Removes protection from the workbook.
Use this method to remove protection that was applied with Protect(string, bool, bool) or
another non-password overload of protect. If the workbook was protected with
a password, use Unprotect(string) with the correct password instead.
void Unprotect(string password = null)
Sub Unprotect(Optional password As String = Nothing)
| Type | Name | Description |
|---|---|---|
| string | password | The password used to remove protection, or null to remove protection that was applied without a password. |
worksheet.Range["A1"].Value = "Confidential";
workbook.Protect();
workbook.Unprotect();