PivotTable-Fields Page

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

Guest

Hi,
I have a problem with the ListBox Page Fields in a pivotTable.
This Fields in ListBox aren't updated. The code is:
Set pvtTable = Worksheets("Ordini").Range("A9").PivotTable
If pvtTable.RefreshTable = False Then MsgBox "Not Updated Pivot
Table"
pvtTable.PivotCache.OptimizeCache = True
pvtTable.Update


Example:

Fields : A | B | C
Data: 1 xx xx
" 2 xx xx
" 3 xx xx

In the listbox, when i Click the arrow near the Field "A" there are this
data: All, 1 , 2 , 3 with the flag.

now i delete the row 2 from the data,Update the PivotTable and i click the
field "A" and i find the same data:All, 1 , 2 , 3 with the flag. Why ?
The Pivot table remember also the data that aren't or not update.

Thanks
 
My understanding is this is by design. Since at least at some point, 2 was
a valid value, it is retained in the drop down. when you select it, no data
is displayed, but this does not meant that 2 is not a possible legal value.

Debra Dalgleish has code for removing the items:

http://www.contextures.com/xlPivot04.html
 
Back
Top