Print area multiple sheets

  • Thread starter Thread starter ian bartlett
  • Start date Start date
I

ian bartlett

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
 
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
 
Back
Top