how do I change page layout in vba

S

swanno

I am trying to find the code to change the page layout from portrait to
landscape without having to rewrite the entire code again.

Nowhere in the coding does it distinctively show the page layout properties.
 
G

Gord Dibben

With Worksheets("Sheet1")
.PageSetup.Orientation = xlLandscape
.PrintOut
End With

Copied directly from VBA help on "landscape"


Gord Dibben MS Excel MVP
 
Top