SSGetLastValidCell Function
Applies To
fpSpread DLL control
Description
Returns the coordinates of the last valid cell in the sheet.
Syntax
BOOL SSGetLastValidCell(HWND hWnd, LPSS_COORD lpCol, LPSS_COORD lpRow);
BOOL TSpread::GetLastValidCell(LPSS_COORD lpCol, LPSS_COORD lpRow);
Parameters
The following parameters are available:
Parameter | Description |
---|---|
hWnd | Window handle of the fpSpread control |
lpCol | Pointer to variable that receives column number of last valid cell |
lpRow | Pointer to variable that receives row number of last valid cell |
Remarks
This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function.
Use this function to determine the last cell that can receive the focus (become active). You can then reset the active cell to be the last valid cell.
The last valid cell is usually the cell in the last column and last row. However, if the SSSetBool function SSB_EDITMODEPERMANENT option is on, noneditable and locked cells are not valid. Therefore, the last valid cell might not be the cell in the last column and last row. A cell is also not valid if its height or width is set to zero.
Return Value
TRUE if the function completes successfully; FALSE otherwise.
See Also
SSGetFirstValidCell, SSSetSheet functions
ActiveX Correspondence
GetLastValidCell method