T
TS
Hi there,
When I record a macro the code looks like this:
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Year")
.PivotItems("2004").Visible = True
End With
Then I try to run the macro, but all I get is a "Runtime Error 1004: Unable
to set the Visible Property of the PivotItem class"
Hiding the PivotItem is no problem: just change True in false and the macro
runs fine.
Experts, what's wrong with the code?
I'm using Excel2000-Sr1.
When I record a macro the code looks like this:
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Year")
.PivotItems("2004").Visible = True
End With
Then I try to run the macro, but all I get is a "Runtime Error 1004: Unable
to set the Visible Property of the PivotItem class"
Hiding the PivotItem is no problem: just change True in false and the macro
runs fine.
Experts, what's wrong with the code?
I'm using Excel2000-Sr1.