GoatieEddie
Technical User
Hi,
I have this code that works fine:
For Each PItem In ActiveSheet.PivotTables("PT-Table"
.PivotFields("Name"
.PivotItems
If Mid(PItem, 4, 1) = "A" Then PItem.Visible = True Else PItem.Visible = False
Next
However, each time it iterates it recalculates the pivottable. Can I turn this off at the beginning of the routine and back on at the end. I have tried Application.Calculation but this makes no difference.
Thanks,
GE
I have this code that works fine:
For Each PItem In ActiveSheet.PivotTables("PT-Table"
If Mid(PItem, 4, 1) = "A" Then PItem.Visible = True Else PItem.Visible = False
Next
However, each time it iterates it recalculates the pivottable. Can I turn this off at the beginning of the routine and back on at the end. I have tried Application.Calculation but this makes no difference.
Thanks,
GE