Hide gridlines in a worksheet

How to hide gridlines in a worksheet using Excel and VBA methods

METHOD 1. Hide gridlines in a worksheet using a ribbon option

EXCEL

Select worksheet > View tab > Show group > Uncheck Gridlines checkbox

1. Select the worksheet in which to hide the gridlines.
Note: in this example we are hiding the gridlines in Sheet 2.
Select a specific sheet

2. Select the View tab. Select the View tab

3. Click on the Gridlines checkbox, in the Show group, to unselect the checkbox. Uncheck Gridlines checkbox

METHOD 2. Hide gridlines in a worksheet using a ribbon option

EXCEL

Select worksheet > Page Layout tab > Sheet Options group > Gridlines > Uncheck View checkbox

1. Select the worksheet in which to hide the gridlines.
Note: in this example we are hiding the gridlines in Sheet 2.
Select a specific sheet

2. Select the Page Layout tab. Select the Page Layout tab

3. Uncheck the View checkbox under the Gridlines title, in the Sheet Options group. Uncheck Gridlines checkbox

METHOD 1. Hide gridlines in a worksheet using VBA

VBA

Sub Hide_Gridlines()
'hide gridlines in an active worksheet
ActiveWindow.DisplayGridlines = False

End Sub

METHOD 2. Hide gridlines in a specific worksheet using VBA

VBA

Sub Hide_Gridlines()
Dim ws As Worksheet
Set ws = Worksheets("Sheet2")
'hide gridlines in a worksheet named Sheet2
ws.Activate
ActiveWindow.DisplayGridlines = False

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
PREREQUISITES
Worksheet Names: Have a worksheet named Sheet2.

ADJUSTABLE PARAMETERS
Sheet Selection: Select the worksheet in which you want to hide the gridlines by changing the Sheet2 worksheet name in the VBA code.

Explanation about how to hide gridlines in a worksheet

EXPLANATION

EXPLANATION
This tutorial explains and provides step by step instructions on how to hide gridlines in a single worksheet using Excel and VBA methods.

Excel Methods: This tutorial provides two Excel methods that can be applied to hide gridlines in a single worksheet. Both of the methods are very similar to each other, with one using the View tab and the other using the Page Layout tab. Using either of the two methods you can hide gridlines, in a single worksheet, in three steps.

VBA Method: Using VBA the gridlines can be hidden in an active or a specific worksheet by setting the ActiveWindow.DisplayGridlines to False.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to show gridlines in a worksheet using Excel and VBA methods
How to hide gridlines in multiple worksheets using Excel and VBA methods
How to show gridlines in multiple worksheets using Excel and VBA methods
How to hide gridlines in a workbook using Excel and VBA methods
How to show gridlines in a workbook using Excel and VBA methods