Window.GridlineColorIndex (Excel)

Returns or sets the gridline color as an index into the current color palette or as an XlColorIndex constant. Possible return values are xlColorIndexAutomatic - Automatic color, xlColorIndexNone - No color.

Set this property to xlColorIndexAutomatic to specify the automatic color.


ActiveWindow.GridlineColorIndex = xlColorIndexAutomatic