View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
jason jason is offline
external usenet poster
 
Posts: 104
Default PivotTable question

I'm a bit confused.Do you just want:

ActiveSheet.PivotTables("PivotTableNameInHere").Re freshTable

This is from a recorded macro
Or:

ThisWorkbook.RefreshAll

This will refresh all pivots in the workbook.

Regards,
Jason.

Debra Dalgleish wrote in message ...
There's code on the following page for removing old items from a
dropdown. It's not tested on an OLAP cube, but may help:

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

lc wrote:
I found a way to refresh data in pivot table by changing its query
(PivotCache.CommandText). The problem is that, even though data gets
refreshed fine, the dimension members remain the same. How do I go about
refreshing everything? The "Refresh Data" toolbar button refreshes all.

BTW, I also noticed that, if a dimension is already used on one of the pivot
pages, its members will never refresh until it gets removed from pivot page
and the data got refreshed again.

Finally, dimension members do refresh with new members (if query changed
so), but old members that no longer should show are still there.