Hello,
I need macro or VBA code to print all data in the table based on # column like filter 1 then print then filter 2 and print etc
can anyone help, pleaseAttachment 26954Attachment 26955Attachment 26956
Hello,
I need macro or VBA code to print all data in the table based on # column like filter 1 then print then filter 2 and print etc
can anyone help, pleaseAttachment 26954Attachment 26955Attachment 26956
i try this macro but it didn't work
Code:Sub Macro1()
'
' Macro1 Macro
'
'
With ActiveSheet.PivotTables("PivotTable1").PivotFields("#")
.PivotItems("2").Visible = False
.PivotItems("3").Visible = False
.PivotItems("4").Visible = False
.PivotItems("5").Visible = False
.PivotItems("6").Visible = False
.PivotItems("7").Visible = False
.PivotItems("#N/A").Visible = False
.PivotItems("(blank)").Visible = False
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Range("A3").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields("#")
.PivotItems("1").Visible = False
.PivotItems("2").Visible = True
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
ActiveSheet.PivotTables("PivotTable1").PivotSelect "'#'[All]", xlLabelOnly, _
True
With ActiveSheet.PivotTables("PivotTable1").PivotFields("#")
.PivotItems("2").Visible = False
.PivotItems("3").Visible = True
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Range("A3").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields("#")
.PivotItems("3").Visible = False
.PivotItems("4").Visible = True
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
With ActiveSheet.PivotTables("PivotTable1").PivotFields("#")
.PivotItems("4").Visible = False
.PivotItems("5").Visible = True
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
With ActiveSheet.PivotTables("PivotTable1").PivotFields("#")
.PivotItems("5").Visible = False
.PivotItems("6").Visible = True
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
With ActiveSheet.PivotTables("PivotTable1").PivotFields("#")
.PivotItems("6").Visible = False
.PivotItems("7").Visible = True
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False EndSub