473,241 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Selectively refresh pivot table

3
I have two pivot tables, but when my macro refreshes the pivot tables it refreshes all, but I want it to pick say for example;

Say range "B8" of pivot table 1 is 60, I want the range "x2" of pivot table 7 also to pick 60 and then refersh it. Below is the coding which I have done, can anyone help?

Expand|Select|Wrap|Line Numbers
  1. Range("B8").Select
  2.     ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
  3.     Range("B31").Select
  4.     ActiveSheet.PivotTables("PivotTable2").PivotCache.Refresh
  5.     Range("B54").Select
  6.     ActiveSheet.PivotTables("PivotTable3").PivotCache.Refresh
  7.     Range("B77").Select
  8.     ActiveSheet.PivotTables("PivotTable4").PivotCache.Refresh
  9.     Range("B100").Select
  10.     ActiveSheet.PivotTables("PivotTable5").PivotCache.Refresh
  11.     Range("B129").Select
  12.     ActiveSheet.PivotTables("PivotTable6").PivotCache.Refresh
  13.     Range("X2").Select
  14.     ActiveSheet.PivotTables("PivotTable7").PivotCache.Refresh
  15.     Range("X24").Select
  16.     ActiveSheet.PivotTables("PivotTable8").PivotCache.Refresh
  17.     Range("X49").Select
  18.     ActiveSheet.PivotTables("PivotTable9").PivotCache.Refresh
  19.     Range("X76").Select
  20.     ActiveSheet.PivotTables("PivotTable10").PivotCache.Refresh
  21.     Range("X101").Select
  22.     ActiveSheet.PivotTables("PivotTable11").PivotCache.Refresh
  23.     Range("AM5").Select
  24.     ActiveSheet.PivotTables("PivotTable12").PivotCache.Refresh
  25.     Range("AM29").Select
  26.     ActiveSheet.PivotTables("PivotTable13").PivotCache.Refresh
  27.     Range("AM59").Select
  28.     ActiveSheet.PivotTables("PivotTable14").PivotCache.Refresh
  29.     Range("AM89").Select
  30.     ActiveSheet.PivotTables("PivotTable15").PivotCache.Refresh
  31.     Range("AM115").Select
  32.     ActiveSheet.PivotTables("PivotTable16").PivotCache.Refresh
  33.     MsgBox ("Please proceed to updating the layout rotation")
  34.  
  35. End Sub
Thanks a Mill!
Jul 30 '07 #1
0 1755

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Prasad Patil | last post by:
Hi, I have created a report in excel, it uses Pivot tables. The excel has two sheets 1: Pivot ( Contains the Pivot Table) 2: Data (Data Requred to populate the pivot table I create an...
2
by: Rob | last post by:
I'm just getting around to using pivot tables and charts. I find the Pivot table interface to be INCREDIBLY frustrating. When I view a table in Design view, then choose Pivot table view, I get...
3
by: Jerry K via DotNetMonster.com | last post by:
I'm creating a pivot table using vb.net and the data is from sqlserver (desktop). I have been successful at creating the pivot table, which includes a 'date' column field. I'd like to group the...
8
by: PhilBowen | last post by:
I have created a pivot table making reference to a query. It works perfectly well. However, when I go out of the database and then back in the pivot table appears as a "form". I can click on the...
5
by: Pourya99 | last post by:
Hello, I have an Access Data Access Page which has a pivot table. The data source of the pivot table is a SQL database table. The data in the pivot table itself is not a problem. I have a text...
4
bhcob1
by: bhcob1 | last post by:
Hi guys, I need to create a Pivot Table on my database, I don't know much about them. I want the user to be able to direct themselves from my main switchboard (via a cmd button) to the pivot...
1
by: ravindarjobs | last post by:
hello friends, i am using ms access 2003, vb6. i want a pivot table get refreshed automatically when i open it. how can we refresh data in a pivot table programatically. thanq
0
by: ravindarjobs | last post by:
Hello friends, I am using ms access 2003, and Vb6. i am displaying a table in a form as pivot table (following "Auto Form: Pivot Table" Wizard) Usually i select the items i want to be...
1
by: mld01s | last post by:
I really need help!!! I dont know if its possible to share pivot tables, or see pivot tables in other machines that the one where the tables were created. This is what happens: I created a...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.