Hi fellow VBA Dabblers,...
Does anyone know how to return if a pivot item is hidden via vba?
This code runs but returns false even though many are true
------------------------------
Sub Pivot_Items_Selected()
Dim PvtItemName As String
With ActiveSheet.PivotTables("PivotTable2").PivotFields("MY_FIELD")
For i = 1 To .PivotItems.Count
PvtItemName = .PivotItems(i).Name
If .PivotItems(PvtItemName).Visible = False Then
Debug.Print .PivotItems(i).Name
Else
End If
Next
End With
End Sub
Does anyone know how to return if a pivot item is hidden via vba?
This code runs but returns false even though many are true
------------------------------
Sub Pivot_Items_Selected()
Dim PvtItemName As String
With ActiveSheet.PivotTables("PivotTable2").PivotFields("MY_FIELD")
For i = 1 To .PivotItems.Count
PvtItemName = .PivotItems(i).Name
If .PivotItems(PvtItemName).Visible = False Then
Debug.Print .PivotItems(i).Name
Else
End If
Next
End With
End Sub