Print Orientation Toggle

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to write a macro that will allow me to toggle between Portrait &
Landscape modes.

I know this should be simple, but I'm missing something.

Please assist.
 
Hi Alan

Sub PrintToggle()
With ActiveSheet.PageSetup
If .Orientation = xlPortrait Then
..Orientation = xlLandscape
Else
..Orientation = xlPortrait
End If
End With
End Sub

--
XL2002
Regards

William

(e-mail address removed)

| I'm trying to write a macro that will allow me to toggle between Portrait
&
| Landscape modes.
|
| I know this should be simple, but I'm missing something.
|
| Please assist.
 
Alan

Sub Toggle_Orient()
With ActiveSheet.PageSetup
If .Orientation = xlLandscape Then
.Orientation = xlPortrait
Else
.Orientation = xlLandscape
End If
End With
End Sub

Gord Dibben Excel MVP
On Mon, 13 Dec 2004 17:05:01 -0800, Alan Tolkoff <Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top