Application.GetCellInfo method (Project)
Gets the cell object at the specified coordinates.
Syntax
expression. GetCellInfo
( _x_
, _y_
)
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
x | Required | Long | Horizontal coordinate on the grid. |
y | Required | Long | Vertical coordinate on the grid. |
Return value
Cell
Remarks
The coordinates x=0, y=0 specify the top-left corner of the grid. The coordinate value increases to the right for x coordinates and down for y coordinates. The value of x must be less than or equal to the number of columns in the view. The value of y must be less than or equal to the number of rows in the view.
Example
The following example sets the cell at x=1, y=0 to red.
Dim c As Cell
Set c = Application.GetCellInfo(1, 0)
c.CellColor = pjRed
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.