Question : What is the Excel VBA to refresh a pivot table?

Hi Experts,

What is the Excel VBA to refresh a pivot table?

thanks

Answer : What is the Excel VBA to refresh a pivot table?

Its this...

 ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh

I have assumed your there on the sheet where pivot is and pivot name is pivottable1

Incase if you referesh cache as in clearing the old data from fields which are not there..then follow this link..

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

Saurabh...
Random Solutions  
 
programming4us programming4us