|
-
Jul 23rd, 2011, 11:58 AM
#1
Thread Starter
Member
[RESOLVED] [Excel VBA] Refreshing multiple pivot tables
I am working on speeding up a program, as usual. It currently loops through every pivot table in the entire workbook and refreshes it, and there are 46 tables. I'm hoping I can just refresh them all at once, especially since I think all of them are using the same source data, which is a table (not a table object, just a bunch of data grouped together, but I can make it a table object, obviously, if necessary) in the Worksheet("Data"). The pivot tables were not created using the VBA code. The program runs, updates the data, then I want to refresh the pivots. The current code is basically:
Code:
For each wksht in ThisWorkbook.Worksheets
For each pvt in wksht.PivotTables
pvt.RefreshTable
Next pvt
Next wksht
UPDATED: See below, I still need help, have not found solution
As I mention below, I know one option is
Code:
ThisWorkbook.RefreshAll
HOWEVER, that doesn't work in the program I am dealing with. When I try to use this simpler, and I thought faster, code, I get an error:
Run-time error '1004':
The Microsoft Jet database engine cannot find the input table or query 'whatitscalled'. Make sure it exists and that its name is spelled correctly.
Last edited by ActSciMan; Jul 25th, 2011 at 08:11 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|