Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Finding the name of pivot table

  Asked By: Cody    Date: Nov 04    Category: MS Office    Views: 911
  

I often update Pivot tables from VBA, but if I change the pivot table
layout, the pivot table receives a new name (at least that's what I
think happens) and my VBA-code fails.
Originally I have found the name of the pivot table by recording a
macro, but it seems daft to have to do this every time I change the
layout.

Example:

Sheets("Pivot Finished").Select
Range("A4").Select
ActiveSheet.PivotTables("Pivottabell4").PivotCache.Refresh

If I have changed the pivot table, I get a message saying (translated):

"Can't find the PivotTables Property for the Worksheets Class"

Anyone?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Finding the name of pivot table Or get search suggestion and latest updates.




Tagged: