View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
J.W. Aldridge J.W. Aldridge is offline
external usenet poster
 
Posts: 425
Default set print area on multiple sheets

adjusted the two.

wrong number of arguments or invalid property assignment.




Sub printareamacro()
mySh As Object
With mySh
With .PageSetup
.PrintArea = .Range("a1").CurrentRegion.Address
.Orientation = xlLandscape
.CenterHorizontally = True
.CenterVertically = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

With .Cells.Font
.Name = "Arial"
.Size = 12
End With

.Cells.EntireColumn.AutoFit
'.PrintPreview
End With
End Sub



Sub pRINT_EM()
For Each sh In ThisWorkbook.Sheets
If sh.Index x Then
Call printareamacro(mySh:=sh)
End If
Next sh

End Sub