determine if Pivot Table field item is hidden

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field in a pivot table named "PC GROUP" with an item named "DSD". I
am wondering if there is a way to programmatically determine if DSD is
currently a hidden (or visible) item.

Thank you for your help.
 
Rich,

Maybe check the Orientation property of the pivot filed. Try:

Sub test()
If ActiveSheet.PivotTables("PC GROUP").PivotFields("DSD").Orientation =
xlHidden Then
MsgBox "DSD field is hidden"
End If
End Sub
 
If ActiveSheet.PivotTables(1).PivotFields("PC GROUP") _
.PivotItems("DSD").Visible Then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top