View Single Post
 
Old 02-03-2014, 06:39 AM
galkej galkej is offline Windows 8 Office 2013
Novice
 
Join Date: Feb 2014
Posts: 3
galkej is on a distinguished road
Default 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
Reply With Quote