![]() |
How do I print alternate worksheets in Portrait and Landscape?
Say I have 10 worksheets.
I want to print #1, #3, #5, ... in Portrait and #2, #4, #6, ... in Landscape. |
How do I print alternate worksheets in Portrait and 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 "BIEDW" wrote: Say I have 10 worksheets. I want to print #1, #3, #5, ... in Portrait and #2, #4, #6, ... in Landscape. |
How do I print alternate worksheets in Portrait and Landscape?
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" wrote in message ... Say I have 10 worksheets. I want to print #1, #3, #5, ... in Portrait and #2, #4, #6, ... in Landscape. |
All times are GMT +1. The time now is 06:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com