LeaveCell, ScriptLeaveCell Events
Applies To
fpSpread control
Description
Occurs when the user moves the focus from one cell to another.
Syntax
C++
afx_msg void OnLeaveCellfpSpread(UINT, int, CWnd*, LPVOID);
Visual Basic
Sub fpSpread_LeaveCell(ByVal Col As Long, ByVal Row As Long, ByVal NewCol As Long, ByVal NewRow As Long, Cancel As Boolean)
Note: The ScriptLeaveCell event uses the same syntax except event parameters that are not passed "ByVal" are declared as variants. For more information on Script events, see Scripting Environment Usage. |
Parameters
The following parameters are available:
Parameter | Description |
---|---|
Col | Column number of cell losing the focus |
Row | Row number of cell losing the focus |
NewCol | Column number of cell receiving the focus |
NewRow | Row number of cell receiving the focus |
Cancel | Set this value to True to prevent the focus from moving |
Remarks
The LeaveCell event occurs before the active cell moves, letting you prevent certain actions.
If the focus is moved outside of the control, both the NewCol and NewRow parameters return –1.
Use the SheetSendingEvent property if you want to return the sheet for which this event occured.
Notes:
|
See Also
ScriptEnhanced, SheetSendingEvent properties