Al,
Thanks! IT works!
Here's my code. Had it exclude certain worksheets. But it takes a couple of seconds for each worksheet. Is because it's looping though the excluding certain worksheets part? How can I get it to exclude them once and for all and then set print areas for all other sheets??
Also, I want to just set the print area to print on ONE page only.
Can I just use only
.FitToPagesWide = 1
.FitToPagesTall = 1
and exclude the rest?
From .LeftHeader = ""
to .Zoom = False
THANKS!
CODE:
For Each ws In Worksheets
If ws.Name <> "Summary" Then
If ws.Name <> "Conversion Factors" Then
If ws.Name <> "Coatings - All" Then
If ws.Name <> "PivotTable" Then
If ws.Name <> "Calculations" Then
If ws.Name <> "PivotTable-Constituents&Coating" Then
ws.Select
ActiveSheet.PageSetup.PrintArea = Range("A1", Range("H65536").End(xlUp)).Address
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End If
End If
End If
End If
End If
End If
Next ws
End Sub