Orientation Property [WksPageSetup]

The Orientation property returns or sets the page orientation (landscape or portrait) for the worksheet. Returns a Long.

Syntax

object.Orientation

object.Orientation = Orientation

 

Parameter Type Description
Orientation Long required, wksOrientation

 

Example 1

This example demonstrates how to return the orientation of a worksheet document to be printed.

Debug.Print WksPageSetup.Orientation

 

Example 2

This example demonstrates how to set a worksheet document to be printed in a portrait orientation.

WksPageSetup.Orientation = wksOrientationPortrait

 

Used by: WksPageSetup object