MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Pivot table VBA question

  Asked By: Techguy    Date: Feb 12    Category: MS Office    Views: 2199

When you open a workbook and the user first re-excutes a query to
refresh data, should you delete the pivotcache?
Is it possible to delete a pivotcache in VBA.
Or should you add a new one?



1 Answer Found

Answer #1    Answered By: Fabia Ferrrari     Answered On: Feb 12

Yes, it is possible to delete  a pivot  cache using VBA.

I don't know why you would want to add  a new one, unless maybe you deleted the
old one.

My understanding is that a pivot refresh after your "re-query" is all that is
required. I do this all the time in VBA except my "re-query" is copying an
Excel sheet from another workbook  (which actually is a re-fresh from Oracle).

Didn't find what you were looking for? Find more on Pivot table VBA question Or get search suggestion and latest updates.