473,769 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Selectively refresh pivot table

3 New Member
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 1785

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

Similar topics

0
2111
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 instance of Excel populate the data sheet and load excel in the browser.
2
5844
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 the PivotTable Field list, from which I can choose to add fields to the view. 1. How do you get RID of a field once you put it in? I can not right click on anywhere in the view and have ANY of the submenu options be availble. From the PivotTable...
3
10269
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 date column field by months and quarters, but can't come up with the correct code. Here is the code I've written to create the pivot table. Any help to code grouping the date column field would be appreciated. Thanks, Jerry
8
5932
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 "design" icon to change back to pivot table. It is however frustrating to have to do this each time. I have checked the properties and everyhting appears to reference to pivot table. Can you please advise what I need to do to see the pivot table each...
5
4544
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 box below the pivot table. Let's say the pivot table has: First Name, Last Name, and Address. When I click on a record in the pivot table, I want the Address for that selected record to be displayed in the textbox below. What I have currently...
4
2154
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 table. Where is it best to create a pivot table VBA, Form, Page... I would like the Pivot Table to not save the users changes but instead open up as a defualt that i set. So I guess my question is, where is the best place to create a Pivot Table for...
1
2250
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
1541
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 displayed in the pivot table by dragging them on to the pivot Table from Pivot Fields. But i got a Problem. My table wil have Columns Dynamically. i mean the colums may increase and decrease from time to time. so my requirement is to display the Updated...
1
2204
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 database to track different daily results. In a form in that database I added a pivot table, this table lets me see the results, sort them, and everthing a pivot table should let users do. Below the pivot table on the same form I have some fields for...
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9422
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9851
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8863
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2811
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.