View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default PivotFields problem

Hi folks,

I use the following code to get the items of PivotFields("Managers"). It
works ok but not exactly what I am looking for. In the
PivotFields("Managers"), I hide some of the items which I dont want to show
on the list. Could anyone show me the way to exclude the hidden items? Any
help will be appreciated.

Thanks in advance.

Tim.

Sub Macro1()

Set nwSheet = Worksheets.Add
nwSheet.Activate

rw = 0
For Each pvtitem In Sheets("Sheet1").PivotTables("PivotTable1") _
.PivotFields("Managers").PivotItems
rw = rw + 1
nwSheet.Cells(rw, 1).Value = pvtitem.Name

Next

End Sub