The Orientation property 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 |
required; landscape or portrait |
Example 1
This example demonstrates how to return the orientation of a worksheet document.
Debug.Print WksPageSetup. Orientation
Example 2
This example demonstrates how to set a worksheet document to a portrait orientation.
WksPageSetup.Orientation = wksOrientationPortrait
Used by: WksPageSetup object