CGrid:SelectSheet
The SelectSheet method selects the current sheet from the range 1 through GetNumSheets.
bSuccess = G:SelectSheet( nIndex )
where
nIndex is the index of the sheet to be selected. It must be in the range 1 to GetNumSheets.
bSuccess is the returned success code. On success it is true, otherwise false.
The following script creates a CGrid and selects the current sheet:
|
-- new grid with 3 cols, 10 rows, 4 sheets |
|
-- Select sheet 2 |
|
-- result: success = 1 |
|
-- Select sheet 5 (out of range) |
|
-- result: success = 0 |