PrintGridlines Property

PrintGridlines returns or sets whether grid lines will be printed in the worksheet. It has a Boolean value. If this value is set to 'True', grid lines are drawn separating each column and row. If the value is set to 'False', grid lines will not be printed.

Syntax

object.PrintGridlines

object. PrintGridlines = Gridlines

Parameter

Type

Description

Gridlines

Boolean

required

Example 1

This example demonstrates how to return whether or not grid lines will be printed in the worksheet.

Debug.Print WksPageSetup.PrintGridlines

Example 2

This example demonstrates how to set the grid lines to print in the worksheet.

WksPageSetup.PrintGridlines = True

Used by: WksPageSetup object