ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reading field values selected by a Page variable (https://www.excelbanter.com/excel-programming/414503-reading-field-values-selected-page-variable.html)

Mark Parent

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?


All times are GMT +1. The time now is 10:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com