NativeExcel suite v2.x

Protect method

Protects a worksheet so that it cannot be modified.

Syntax

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

Example

This example protects worksheet one.
Workbook.Sheets[1].Protect('mypass123');
Copyright © NikaSoft 2004-2012