Syntax

expression.DisplayGridlines

expression A variable that represents a Window object.

Remarks

This property applies only to worksheets and macro sheets.

This property affects only displayed gridlines. Use the property to control the printing of gridlines.

Example

This example toggles the display of gridlines in the active window in Book1.xls.

Visual Basic for Applications
Workbooks("BOOK1.XLS").Worksheets("Sheet1").Activate ActiveWindow.DisplayGridlines = Not(ActiveWindow.DisplayGridlines) 

See also: