NativeExcel suite v2.x

Protect method

Protects a workbook so that it cannot be modified.

Syntax

procedure Protect();
procedure Protect(Password: string);
PasswordOptional string. A string that specifies a case-sensitive password for the workbook. If this argument is omitted, you can unprotect the workbook without using a password. Otherwise, you must specify the password to unprotect the workbook.

Example

This example sets the password for the workbook.
workbook.Protect('mypass123');
Copyright © NikaSoft 2004-2012