Window.GridlineColorIndex Property (Excel)

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.

ActiveWindow.GridlineColorIndex = 5

See Also

Concepts

Window Object Members

Window Object