View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default Refreshing Pivots in multiple tabs

Hi Fred

Try using
ActiveWorkbook.RefreshAll


--

Regards
Roger Govier

"FredL" wrote in message
...
So I have this simple macro that refreshes the pivot tables in a template.
However, I have it specifying the Sheet number and Pivot Table names. The
problem comes when a user would deletes or even hides a tab or copy over a
pivot without renaming the table. Is there any way I can program it such
that it will refresh all pivot tables in a tab that is between 2 tabs.

For example:
tab 1
tab 2
tab 3
tab 4

Refresh all pivots that are between tab 1 and 4.
Then I can add tabs in between and not have to worry about Pivot Table
names.

Thanks.