Chip,
Thanks, it fixed that one but now it stops on
PrintQuality = 600 which may be unique to the print
setup. If so, how can I make this work universally.
The other hang up is on the line:
..PrintErrors = xlPrintErrorsDisplayed
But if delete it everything goes okay. The one I can't
get is how to make the PrintQuality a universal setting.
My whole routine is as follows:
Sub Print_Man_Hours_by_Division_Report()
'
' Print_Man_Hours_by_Division_Report Macro
' Macro recorded 9/4/2003 by J. Christopher Cantele
'
' Make sure the TimeSheet Sheet is active
Sheets("TimeSheet").Activate
'
Range("A4").Select
Selection.RemoveSubtotal
Range("=Offset(I4,,,CountA(I:I),-9)").Sort Key1:=Range
("F4"), Order1:=xlAscending, Key2:=Range _
("H4"), Order2:=xlAscending, Key3:=Range("B4"),
Order3:=xlAscending, _
Header:=xlGuess, OrderCustom:=1,
MatchCase:=False, Orientation:= _
xlTopToBottom
Selection.Subtotal GroupBy:=6, Function:=xlSum,
TotalList:=Array(9), _
Replace:=True, PageBreaks:=False,
SummaryBelowData:=True
'Set up Page
Range("A4").Select
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$3"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = _
"&""Times New Roman,Bold""&16QCI Marine Offshore
Man Hours by Division&""Times New Roman,Regular""&10" &
Chr(10) & ""
.RightHeader = ""
.LeftFooter = "&D"
.CenterFooter = "Page &P of &N"
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.57)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 78
.PrintErrors = xlPrintErrorsDisplayed
End With
ActiveSheet.PageSetup.PrintArea = "=Offset(I1,,,CountA
(I:I),-9)"
ActiveSheet.PrintPreview
End Sub