Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Page setup for multiple pages
I want my macro to apply the same print settings to
multiple sheets in my workbook. I have tried the following code but get an error in the first line. With ActiveWorkbook.Worksheets(Array ("Reference", "IncomeStatement", "CashStatement 1", "CashStatement 2")).PageSetup .PaperSize = xlPaperLegal .Zoom = False .FitToPagesWide = 1 .FitToPagesTall = 1 End With Any suggestions are much appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Page setup for multiple pages
Lynn,
Not sure - but I think you need to loop through the sheets separately. This worked for me... Dim x as Long For x = 1 to 4 With ActiveWorkbook.Sheets(x).PageSetup .PaperSize = xlPaperLegal .Zoom = False .FitToPagesWide = 1 .FitToPagesTall = 1 End With Next You could use an If or Select Case to set the worksheet names for each x. -- sb "Lynn" wrote in message ... I want my macro to apply the same print settings to multiple sheets in my workbook. I have tried the following code but get an error in the first line. With ActiveWorkbook.Worksheets(Array ("Reference", "IncomeStatement", "CashStatement 1", "CashStatement 2")).PageSetup .PaperSize = xlPaperLegal .Zoom = False .FitToPagesWide = 1 .FitToPagesTall = 1 End With Any suggestions are much appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
setting page setup/print area for multiple sheets | Excel Discussion (Misc queries) | |||
When using show pages in a pivot table can I keep the page setup? | Excel Discussion (Misc queries) | |||
changing the page setup for multiple worksheets in a workbook | Excel Discussion (Misc queries) | |||
Page Setup Across Multiple Worksheets | Excel Worksheet Functions | |||
Page Setup for multiple worksheets macro problem | Excel Discussion (Misc queries) |