CenterVertically Property

 

The CenterVertically property returns or sets the vertical centering of the worksheet page setup. Returns a Boolean.

 

Syntax

object.CenterVertically

object.CenterVertically = VCenter

 

Parameter

Type

Description

VCenter

Boolean

required; true to center the page vertically

 

Example 1

This example demonstrates how to return whether or not worksheet contents will be centered vertically when printed.

 

Debug.Print WksPageSetup. CenterVertically

 

Example 2

This example demonstrates how to vertically center worksheet contents to be printed.

 

WksPageSetup.CenterVertically = True

 

Used by: WksPageSetup object