[]
        
(Showing Draft Content)

GrapeCity.Spreadsheet.IWorksheet.Protect

Protect Method

Protect(WorksheetLocks, string)

Protects a sheet so that it cannot be modified.

Declaration
bool Protect(WorksheetLocks locks, string password = null)
Function Protect(locks As WorksheetLocks, Optional password As String = Nothing) As Boolean
Parameters
Type Name Description
WorksheetLocks locks

A WorksheetLocks value indicates which data will be protected.

string password

A string that specifies a case-sensitive password for the sheet.

Returns
Type Description
bool

true if the sheet is protected successful, false otherwise.