LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Pivot Table(s) - refresh in sheet - macro - automate

Hello:

I have two tables, in separate Work Sheets: Table1 and Table2.
- Table1 and Table2 are periodically updated. Generally only the number of
rows changes, up or down.

I have a separate Work Sheet called Info1. There I slice and dice the data
from both tables, with the use of 3 Pivot Tables, which were created
side-by-side. I will have Work Sheet with pivots, called: Info2, Info3, etc.

Question 1:

The toolbar offers a button to refresh a Pivot table. I recorded the
procedure (using a macro) called it PivotUPDT.

Sub PivotUPDT()
ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh
End Sub

How do I tweak so that this procedure refreshes any and all Pivot Tables, in
an active Work Sheet, be it Info1, Info 2 or Info 3?

"PivotTable1" suggests only the first Pivot Table that was created will be
refreshed.

Question 2:

If the boundy of my Table1 or Table2 changes (i.e. less rows are present
than before).
In Info1, for example, I want to be able to update the range that a Pivot
Table is mapped to. What is the code for that? I'm ok with making a button
for each Pivot Table in Info1 as long as I know how to do it.

Thanks,
Pepe
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to refresh the pivot table while the excel sheet in shared? Nagarajan Excel Worksheet Functions 0 January 22nd 09 04:19 PM
Refresh Pivot Table when Sheet is PW Procted Mayte Excel Worksheet Functions 1 June 13th 08 02:25 AM
Refresh pivot table on protected sheet richzip Excel Discussion (Misc queries) 3 January 18th 08 08:21 PM
Pivot Table Refresh Deletes Range On Different Sheet TMore Excel Discussion (Misc queries) 0 August 17th 06 01:55 PM
Timing of automatic query refresh and macro pivot table refresh dutty Excel Programming 2 December 1st 04 07:19 PM


All times are GMT +1. The time now is 01:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"