NativeExcel suite v2.x

UnProtect method

Removes protection from a sheet. This method has no effect if the sheet 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 sheet. If the sheet isn't protected with a password, this argument is ignored.
lcidInteger. The locale ID.

Example

This example removes protection from the worksheet one.
Workbook.Sheets[1].Unprotect('mypass123');
Copyright © NikaSoft 2004-2010