SSpread.AfterLeaveCell Event
Occurs after moving the active cell.
The following child objects are attached to the Event object.
| Type | Name | Description |
|---|---|---|
| Number | Col | Active cell column number |
| Number | Row | Active cell row number |
| Number | NewCol | New active cell column number |
| Number | NewRow | New active cell row number |
It also happens when the SSpread object loses focus. In this case, NewCol and NewRow are -1.
This event does not occur if the OperationMode property is $OperationModeRead (read-only mode).
Also, if you move from the script, the event will not occur.
Added since Ver.5.0.2
Example of usage
Function OnAfterLeaveCell(e) {
if (e.NewCol < 0 || e.NewRow < 0) {
return;
}
Col = e.Col;
Row = e.Row;
BackColor = $STD;
Col = e.NewCol;
Row = e.NewRow;
BackColor = $RED;
}
Related Item
LeaveCell event