PrintGridlines Property

 

The PrintGridlines property returns or sets whether grid lines are printed in the worksheet. Returns a Boolean.

 

Syntax

object.PrintGridlines

object.PrintGridlines = Gridlines

 

Parameter

Type

Description

Gridlines

Boolean

required; true to print grid lines

 

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 be printed in the worksheet.

 

WksPageSetup.PrintGridlines = True

 

Used by: WksPageSetup object