JB,
Thanks for you response.
The report is all from one worksheet.
I need to keep detailed data [size varies from project to project] and summary of that data on the same sheet.
Basically the data is copied from another sheet and then a macro generates the summary at the bottom.
When the user selects to print, the macro inserts pagebreaks and sets page sizes, Header, Footer etc.
It also iserts a pagebreak just before the summary so the summary prints on a seperate page.
All other pages [data portion] needs the title row repeated but the last page doesn't need it.
Follwing code sets up pagebreaks and sets print area:
Worksheets("Estimate Rollup Summary").Cells.PageBreak = xlPageBreakNone
Worksheets("Estimate Rollup summary").Rows(LR + 7).PageBreak = xlPageBreakManual
ActiveSheet.PageSetup.PrintArea = "$A$1:$M$" & LR + 4 + z
This is the BeforePrint event:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ScreenUpdating = False
With ActiveSheet.PageSetup
.PrintTitleRows = "$6:$7"
End With
With ActiveSheet.PageSetup
.LeftFooter = "&9Page &P of &N"
.CenterFooter = "&D &T"
.RightFooter = "&F"
.PrintGridlines = True
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.Orientation = xlLandscape
.PaperSize = xlPaper11x17
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
Application.ScreenUpdating = True
End Sub
Thanks again for any help or suggestion you can provide.
modytrane.
Bookmarks