Link Search Menu Expand Document

SSpread.EditError Event

Occurs when an invalid input operation is performed.

The following child objects are attached to the Event object.

Type Name Description
Number Col Column number of the cell where the invalid input was made
Number Row Row number of the cell where the invalid input was made
Number EditError Integer value corresponding to the operation performed
The following values are set.
Value Description
1 Type in a locked cell
2 When the value of the RestrictCols property is $TRUE , enter one or more columns apart.
3 When the value of the RestrictRows property is $TRUE, enter one or more rows apart.
4 When the value of each property of RestrictCols and RestrictRows is $TRUE, enter one or more columns and one or more rows apart.
5 Make an invalid entry in a cell and move to another cell
9 Enter an invalid key in a check box type cell

Example of usage

Function OnEditError(e) {
    if (e.EditError == 1) {
        MessageBox (strf ("(% 1,% 2) is locked ", e.Col, e.Row));
    }
}

Related Item
Lock, Protect, RestrictCols, RestrictRows property
EditChange, EditModeOff, EditModeOn event