|
-
Jul 27th, 2011, 04:03 PM
#1
Thread Starter
Member
[RESOLVED] [Excel VBA] Refresh all pivot tables 2
I know the code
Code:
ThisWorkbook.RefreshAll
should refresh all pivot tables in my workbook. But, it's not working. I have a big range in one worksheet, A1:IC2189 currently though the number of rows is variable. I do a bunch of stuff in the program and then the last few steps are to write in a bunch of data to the range A1:IC2189 and then immediately after that I try the above code to refresh all pivot tables. But, it doesn't refresh them all. Afterword, if I click in a pivot table and do PivotTable Tools/Options/Refresh/RefreshAll, it seems to then refresh all pivot tables. And, if I use the macro recorder when I do that, it gives me the code
Code:
ActiveWorkbook.RefreshAll
so I assume the ThisWorkbook version should also work just fine. Is there some sort of issue about refreshing right after the data is written? That is, maybe the data hasn't updated enough for the pivot table to see it?
Thanks for any help
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
|