vba remove gridline display in Excel

Q195. In Excel, how can I remove display of Gridlines in my worksheet using VBA?

To do it in Excel, here is the answer:

  1. Option Explicit
  2. Sub RemoveGridlineDisplay()
  3. Activewindow.DisplayGridlines =False
  4. End Sub


a) Line 3 removes display of Gridlines in ActiveSheet.


You can find similar Excel Questions and Answer hereunder

1) How can I activate a routine when there is a change in value of a cell?

2) How can I get row count of filtered data?

3) How to concatenate strings in vba in Excel

4) I have a macro that takes a lot of time for execution - how can I keep the user informed that the macro is running?

5) How do I enter a formula in a cell using VBA (using Absolute Reference)?

6) How can I set the fill color, font color and set number format of cell to date?

7) How can worksheet functions be accessed in VBA?

8) How to read a value from a cell in vba in Excel

9) How do i put double quotes in a string in vba in Excel

10) How do I copy a Table from one location to another and retain all formulas, formats and columnwidths?

11) How can I turn off Alerts using VBA?

12) How can I get users to select a folder to save the output of my macro?

13) How can I protect / unprotect WorkSheet using VBA?

14) How do I add a symbol like Triangle / Inverted Triangle for indicating trends in a cell using VBA?

15) How can I add a WorkSheet and name it as required using VBA?