Removes protection from the workbook. This method has no effect if the workbook is not protected.
Namespace: Microsoft.Office.Tools.Excel Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)
The case-sensitive password to use to unprotect the workbook. If the workbook is not protected with a password, this parameter is ignored. If you omit this parameter for a workbook that is protected with a password, the method fails.
The following code example uses the Protect method to protect the structure of the workbook and workbook windows, but without specifying password protection. The example then prompts the user to unprotect the workbook by using the Unprotect method.