Unable to set the visible property of the PivotItem class
Hi, All.
I'm trying to determine which items are visible in each visible field in a
PivotTable called ptSumGraph:
For Each fld In ptSumGraph.PivotFields
For Each vfld In ptSumGraph.VisibleFields
If vfld.Caption = fld.Caption Then
For Each itm In fld.PivotItems
itm.Visible = True
Next itm
End If
Next vfld
Next fld
The error hits at itm.Visible = True
I've seen some other posts where setting the field's AutoSort property to
Manual is suggested, but I still get the same error.
Thanks so much for your help!
Jim
|