Removes protection from a workbook. This method has no effect if the workbook isn't protected.
Syntax
procedure UnProtect();
procedure UnProtect(Password: string);
procedure UnProtect(Password: string; lcid: integer);
| Password | String. A string that denotes the case-sensitive password to use to unprotect the workbook. If the workbook isn't protected with a password, this argument is ignored. |
| lcid | Integer. The locale ID. |
Example
This example removes protection from the workbook.
workbook.UnProtect('mypass123');