GridlineColorIndex Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.  

XlColorIndex

XlColorIndex can be one of these XlColorIndex constants.
xlColorIndexAutomatic
xlColorIndexNone

 

expression.GridlineColorIndex

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

Set this property to xlColorIndexAutomatic to specify the automatic color.

The following illustration shows the color-index values in the default color palette.

Color index values in default color palette

Example

This example sets the gridline color in the active window of Spreadsheet1 to blue.

  Spreadsheet1.ActiveWindow.GridlineColorIndex = 5