Link Search Menu Expand Document

SSpread.Lock Property

Sets whether to lock the entire spreadsheet, rows, columns, cells, or cell blocks (Prevents cell values from being entered or changed).

Before setting this property, use the Col, Row properties, and so on to specify what to do.

Only valid if the Protect property is $TRUE.

Specify $TRUE to lock, or $FALSE otherwise. The initial value is $FALSE.

The color of the locked cell can be changed with the LockForeColor and LockBackColor properties.

Example of usage

Col = 2;
Row = 3;
Lock = $TRUE;
 
BlockMode = $TRUE;
Col = 3;
Row = 3;
Col2 = 5;
Row2 = 5;
Lock = $TRUE;
BlockMode = $FALSE;
 
Protect = $TRUE;
LockForeColor = $BLUE;
LockBackColor = "#FFE69B";

Related Items
LockForeColor, LockBackColor, Protect property