![]() |
Setting print area for entire workbook
I need to set the print area for every sheet in the workbook. When I tried
grouping the sheets first, my option to set the print area was disabled. Any ideas? |
Setting print area for entire workbook
Would one of the following suits your needs?
Sub myMacro() For Each ws In Worksheets ws.PageSetup.PrintArea = "$A$1:$B$2" Next ws End Sub Sub anotherPossibility() For ws = 1 To 2 Sheets(ws).Select ActiveSheet.PageSetup.PrintArea = "$A$1:$C$3" Next ws End Sub "scru_ball" wrote: I need to set the print area for every sheet in the workbook. When I tried grouping the sheets first, my option to set the print area was disabled. Any ideas? |
Setting print area for entire workbook
I have 20 different workbooks each with 26 different worksheets so I would
like to find a way not to select each one individually. When I try to select all sheets in a workbook, the option to set print area is grayed out. "FiluDlidu" wrote: Would one of the following suits your needs? Sub myMacro() For Each ws In Worksheets ws.PageSetup.PrintArea = "$A$1:$B$2" Next ws End Sub Sub anotherPossibility() For ws = 1 To 2 Sheets(ws).Select ActiveSheet.PageSetup.PrintArea = "$A$1:$C$3" Next ws End Sub "scru_ball" wrote: I need to set the print area for every sheet in the workbook. When I tried grouping the sheets first, my option to set the print area was disabled. Any ideas? |
All times are GMT +1. The time now is 01:28 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com