Orientation Property [WksPageSetup]

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

Syntax

object.Orientation

object.Orientation = Orientation

Parameter

Type

Description

Orientation

wksOrientation

required

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