DisplayGridlines Property Example

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

Workbooks("BOOK1.XLS").Worksheets("Sheet1").Activate
ActiveWindow.DisplayGridlines = Not(ActiveWindow.DisplayGridlines)