MarkCBB
Active Member
- Joined
- Apr 12, 2010
- Messages
- 497
HI there VBA pros,
I need some help completing this code, I have most of it done but I am getting stuck with an error.
I am trying to execute some code for each PI in the filter list, however I am getting stuck. below is the code that i have so far.
I need some help completing this code, I have most of it done but I am getting stuck with an error.
I am trying to execute some code for each PI in the filter list, however I am getting stuck. below is the code that i have so far.
Code:
Sub mytest()
With Sheets("CALCULATIONS").PivotTables("PivotTable1").PivotFields("CUSTOMER")
For Each Pi In .PivotItems
Pi.Visible = True
If PivotItems <> Pi.Value = Pi.Visible = False Then
'run this code
End If
Next Pi
End With
End Sub