Changes the dimensions of the Cells grid (number of rows and columns).
object expression.SetGrid (Rows, Columns)
object expression Required. An object expression that evaluates to an object in the Applies To list.
Rows Required Long. A whole number specifying the number of Cell rows to create.
Columns Required Long. A whole number specifying the number of Cell columns to create.
Rows are numbered starting with 1 at the edge of the screen corresponding to the minimum y coordinate and increasing in the positive y direction. Similarly, Columns are numbered starting with 1 at the edge of the screen corresponding to the minimum x coordinate and increasing in the positive x direction. Use the At method to access a Cell by it's row-column indices.
Cells are numbered sequentially starting in the corner of the screen corresponding to the minimum x and y coordinates and ordered first by row and then by column. Use the Item method to access a Cell by its index.
Execution of the SetGrid method destroys all Cell objects that existed before the method was called.
The following example uses the SetGrid method to change the Cells grid dimensions to 50 columns by 50 rows.
Cells.SetGrid 50,50