A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro for Pivot Tables



 
 
Thread Tools Display Modes
  #1  
Old March 14th, 2005, 07:51 PM
Thomas
external usenet poster
 
Posts: n/a
Default Macro for Pivot Tables

Hi, I'm having trouble building a macro on pivot tables. I hope some experts
here can help solve my problem. Any inputs will be greatly appreciated!!

I'm trying to build a macro to refresh data in multiple pivot tables. The
pivot tables are build below one another, and additional rows are inserted
between pivot tables.

When i built a macro to link all tables to the data in the first (master)
pivot table, I found Excel was refreshing the table based on the exact cell I
was clicking. This has become a problem since new rows are inserted between
tables when new data comes in, and pivot tables are no longer at those cells.
The macro i've built cannot refer to the tables and crashed as a result.

I was wondering if I can define or use a dynamic name to select a pivot
table instead of selecting a cell. My colleagues does not know VB and are not
interested in using codes to solve this problem. I was wondering if this can
be done simply.

Hope someone can offer me help. Thanks in advance.
  #2  
Old March 15th, 2005, 01:03 AM
Debra Dalgleish
external usenet poster
 
Posts: n/a
Default

You can refresh all external data ranges and PivotTables in the active
workbook, with the following code:

ActiveWorkbook.RefreshAll


Thomas wrote:
Hi, I'm having trouble building a macro on pivot tables. I hope some experts
here can help solve my problem. Any inputs will be greatly appreciated!!

I'm trying to build a macro to refresh data in multiple pivot tables. The
pivot tables are build below one another, and additional rows are inserted
between pivot tables.

When i built a macro to link all tables to the data in the first (master)
pivot table, I found Excel was refreshing the table based on the exact cell I
was clicking. This has become a problem since new rows are inserted between
tables when new data comes in, and pivot tables are no longer at those cells.
The macro i've built cannot refer to the tables and crashed as a result.

I was wondering if I can define or use a dynamic name to select a pivot
table instead of selecting a cell. My colleagues does not know VB and are not
interested in using codes to solve this problem. I was wondering if this can
be done simply.

Hope someone can offer me help. Thanks in advance.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic macro update Myrna Larson Worksheet Functions 3 February 9th, 2005 07:10 PM
Date macro Hiking General Discussion 9 February 3rd, 2005 12:40 AM
Macro to replace styles used in tables (Word 2000/Windows) [email protected] Tables 6 January 26th, 2005 10:04 PM
Including Subfolders for use within Word 2003 Macro helpserv General Discussion 7 October 6th, 2004 04:38 AM


All times are GMT +1. The time now is 12:19 PM.


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