WorksheetBase.Unprotect Method (Object)
Removes protection from the worksheet. This method has no effect if the worksheet is not protected.
Assembly: Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
The case-sensitive password to use to unprotect the worksheet. If the worksheet is not protected with a password, this argument is ignored. If you omit this argument for a worksheet that is protected with a password, you will be prompted for the password.
The following code example determines whether the cell contents of the current worksheet are protected. If the cell contents are protected, then the example prompts the user to unprotect the cell contents by using themethod.
This example is for a document-level customization.