Share via


Window.GridlineColorIndex Property

Excel Developer Reference

Returns or sets the gridline color as an index into the current color palette or as the following XlColorIndex constant.

Syntax

expression.GridlineColorIndex

expression   A variable that represents a Window object.

Remarks

XlColorIndex can be the following XlColorIndex constant.
xlColorIndexAutomatic

Set this property to xlColorIndexAutomatic to specify the automatic color.

Example

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

Visual Basic for Applications
  ActiveWindow.GridlineColorIndex = 5

See Also