ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print Landscape AND Portrait Orientation in ONE Worksheet (https://www.excelbanter.com/excel-programming/271740-print-landscape-portrait-orientation-one-worksheet.html)

Paul Martin

Print Landscape AND Portrait Orientation in ONE Worksheet
 
Hi guys

- I have a very large worksheet to print.
- All but one page need to print in Portrait.
- The page number of the page that needs to print in Landscape is unknown,
though it's location can be ascertained by a number of means, such as
tagging the start point as a named range.
- I have found the following code posted previously by Stephen Bullen
(apologies for the previous error in surname):

With ActiveSheet
.PageSetup.Orientation = xlLandscape
.PrintOut From:=1, To:=1
.PageSetup.Orientation = xlPortrait
.PrintOut From:=2
End With

- This looks close to the mark, except that I need From and To to be dynamic
rather than static. Any suggestions appreciated.

Thanks in advance

Paul Martin
Melbourne, Australia


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com