View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
scru_ball[_2_] scru_ball[_2_] is offline
external usenet poster
 
Posts: 2
Default 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?