View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Parent Mark Parent is offline
external usenet poster
 
Posts: 14
Default Reading field values selected by a Page variable

I have a pivottable with row, column (District) and page (Region) variables.
There are 80 districts available when Region is set to ALL, but only a few
for each Region.

I need Basic code that can read the District values displayed to the user
depending on the Region selected. The District field is already set to
ascending sorting. The code:
Set fld =
AllDistrictsCalc.PivotTables("PivotTable5").Visibl eFields("District1")
NumDistricts = fld.PivotItems.Count
always returns "80". The code:
For iItem = 1 To NumDistricts
flag = fld.PivotItems(iItem).Visible
Next iItem
tells me all values are visible.

Can anyone point me in the right direction? Am I simply using the wrong
Property?