NativeExcel suite v2.x

UnProtect method

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);
PasswordString. 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.
lcidInteger. The locale ID.

Example

This example removes protection from the workbook.
workbook.UnProtect('mypass123');
Copyright © NikaSoft 2004-2012