Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Removes protection from the worksheet. This method has no effect if the worksheet is not protected.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Sub Unprotect ( _
Password As Object _
)
void Unprotect(
Object Password
)
Parameters
- Password
Type: System.Object
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.
Remarks
If you forget the password, you cannot unprotect the worksheet. It is a good idea to keep a list of your passwords and their corresponding document names in a safe place.
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.