for each pt in sheets("Sheetname".pivottables
pt.refreshtable
Next
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
I have tried that code and it works much better than my individual refreshes. However, out of the 5 pivot tables in
my worksheet a couple of them do not refresh properly. After running this code I need to click on the pivot table, then the refresh button and it refreshes. Why can't I get this code to work on all the pivot tables? Obviously,
I am doing something wrong. I just can't figure out what
it is?
Rgds, Geoff [blue]Experience is something you don't get until just after you need it[/blue]
We want to help [red]you[/red] Help us by reading this FAQ 1st faq222-2244
and some of them do refresh but others don't ???
That is very odd being as the code should be looping through all pivottable objects on the specified sheet...
Rgds, Geoff [blue]Experience is something you don't get until just after you need it[/blue]
We want to help [red]you[/red] Help us by reading this FAQ 1st faq222-2244
I thought it was very odd also. I maximized the worksheet prior to refreshing the pivot tables and it does refresh each one. However, two of them are not a complete refresh, so I need to click on each one and hit the refresh button.
Then it works correctly.
Rgds, Geoff [blue]Experience is something you don't get until just after you need it[/blue]
We want to help [red]you[/red] Help us by reading this FAQ 1st faq222-2244
Have you tried "stepping through" the code, using F8 ??
Please try this and let me know if you get the same issue
Rgds, Geoff [blue]Experience is something you don't get until just after you need it[/blue]
We want to help [red]you[/red] Help us by reading this FAQ 1st faq222-2244
I feel embarrassed. Over the weekend I got to thinking about my code and checked it on various conditions. There
were some times when I modified the basic data after I
refreshed the pivot table.
When I changed the order of all that, the refresh works
perfectly.
Sorry to have bothered you, but I did pick up some great code to automatically refresh the pivot tables.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.