Avatar of AndresHernando

asked on 

Excel VBA - When creating a new window (so there are multiple windows), make new window DisplayGridlines=False

In the View tab of the ribbon I create a New Window.  This window opens with "show gridlines" selected by default.

How can I make the new window  DisplayGridlines=False?

I tried this code in the worksheet VBA page but it doesn't execute since the worksheet is already selected when I create the new window.

Private Sub Worksheet_Activate()

       ActiveWindow.DisplayGridlines = False
End Sub
Microsoft Excel

Avatar of undefined
Last Comment

8/22/2022 - Mon