How do I print alternate worksheets in Portrait and Landscape?

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

Guest

Say I have 10 worksheets.

I want to print #1, #3, #5, ... in Portrait and #2, #4, #6, ... in Landscape.
 
Try

Sub PrintIt()

Dim sht As Worksheet

For Each sht In Worksheets
If sht.Index Mod 2 = 0 Then
sht.PageSetup.Orientation = xlLandscape
Else
sht.PageSetup.Orientation = xlPortrait
End If
sht.PrintOut Copies:=1
Next sht

End Sub

Regards
Rowan
 
Try this, it is crude but should work:

Sub PrintAltFmt()
Dim Frmt As Boolean

For Each ws In ActiveWorkbook.Worksheets
Frmt = Not Frmt
If Frmt Then
ws.PageSetup.Orientation = xlPortrait
Else
ws.PageSetup.Orientation = xlLandscape
End If
ws.PrintPreview
Next ws
End Sub


--
|
+--Thief_
|


BIEDW said:
Say I have 10 worksheets.

I want to print #1, #3, #5, ... in Portrait and #2, #4, #6, ... in
Landscape.
 

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