J
J.W. Aldridge
I've tried several ways to do this, but haven't been successful yet.
Need to run "printareamacro" on all sheets after Ind_brkdwn.
Sub PRINTING_PLEASE()
Dim sh As Worksheet
'for each sheet in workbook after "ind templates"
x = Sheets("IND_BRKDWN").Index
For Each sh In ThisWorkbook.Sheets
If sh.Index > x Then
Call printareamacro
End If
Next
'Application.CutCopyMode = False
End Sub
----------------------------------------------------------------------
Sub printareamacro()
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
With ActiveSheet.PageSetup
.PrintArea = Range("a1").CurrentRegion.Address
.Orientation = xlLandscape
.CenterHorizontally = True
.CenterVertically = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
With Selection.Font
.Name = "Arial"
.Size = 12
End With
End With
'ActiveSheet.PrintPreview
Cells.EntireColumn.AutoFit
End Sub
Need to run "printareamacro" on all sheets after Ind_brkdwn.
Sub PRINTING_PLEASE()
Dim sh As Worksheet
'for each sheet in workbook after "ind templates"
x = Sheets("IND_BRKDWN").Index
For Each sh In ThisWorkbook.Sheets
If sh.Index > x Then
Call printareamacro
End If
Next
'Application.CutCopyMode = False
End Sub
----------------------------------------------------------------------
Sub printareamacro()
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
With ActiveSheet.PageSetup
.PrintArea = Range("a1").CurrentRegion.Address
.Orientation = xlLandscape
.CenterHorizontally = True
.CenterVertically = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
With Selection.Font
.Name = "Arial"
.Size = 12
End With
End With
'ActiveSheet.PrintPreview
Cells.EntireColumn.AutoFit
End Sub