How can I turn off gridlines in excel using VBA, without using ActiveWindow

前端 未结 3 2211
执念已碎
执念已碎 2020-12-16 18:31

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 pie

3条回答
  •  不知归路
    2020-12-16 19:16

    The ActiveWindow is a member of the Windows objects collection. As with any collection, simply refer to the actual window by name rather than by specifying the active window. eg

    Windows("My Workbook.xls").DisplayGridlines = False
    

提交回复
热议问题