I have a VBA macro over Excel 2013 which generate a separate excel report. In this excel report that is created, I would like to turn off the GridLines.
The only piece of code that I come across to make this happens is as below
ActiveWindow.DisplayGridlines = False
However, this excel is generated in the background i.e.,
Dim appObject As New Excel.Application
appObject.Visible = False
Which means that this report is not the ActiveWindow. Is there an alternate way of turning off the gridlines without using the ActiveWindow object?