Run Time Error '1004'
My error is: Unable to get PivtoItems property of the PivotField Class.
My code is below. I am trying to make certain fields within a Pivot table visible/invisible. I am trying to do this within a Macro. Is this possible?
With ActiveSheet.PivotTables("PivotTable3").PivotFields ("Month and Year")
.PivotItems("(blank)").Visible = True
.PivotItems("(blank)").Visible = True
End With
With ActiveSheet.PivotTables("PivotTable3").PivotFields ("Month and Year")
.PivotItems("(blank)").Visible = False
.PivotItems("(blank)").Visible = False
End With
Sheets("SCORE").Select
Range("B1").Select
End Sub
|