View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Print area multiple sheets

Try this

Sub missive()
Dim ws As Worksheet
For x = 1 To Worksheets.Count
LastRow = Worksheets(x).Cells.SpecialCells(xlLastCell).Row
Worksheets(x).PageSetup.PrintArea = "$A$1:$E$" & LastRow
Next
End Sub

Mike

"ian bartlett" wrote:

Hello all.

I have a spreadsheet Excel 2003 with 20-40 sheets in it, this can vary.
What I would like to have happen

1. Set the print area on all sheets in the workbook
find the last row on all sheets, then set the print area there up to and
including column e
the data goes on to column w if that matters

Thanks

Ian