M
mandles1
Hi,
I'm hoping someone can help me out with refreshing a pivot table from a
different worksheet than the one it is in.
I have the following code as part of my macro:
Application.Worksheets("PivotTable-contracts").Activate
ActiveSheet.PivotTables("PivotTable3").PivotCache.Refresh
I also have 2 other worksheets, "PivotTable-products" and
"PivotTable-prices" which I would like to refresh when the same macro
is run. These however are not part of the active worksheet, so how do I
have these two pivot tables refresh by calling them from a different
worksheet?
I've tried a couple things, like:
Worksheets("PivotTable-products").PivotTables("PivotTable4").PivotCache.Refresh
which doesn't seem to work.
Any suggestions would be greatly appreciate!
Thanks- Mandy.
I'm hoping someone can help me out with refreshing a pivot table from a
different worksheet than the one it is in.
I have the following code as part of my macro:
Application.Worksheets("PivotTable-contracts").Activate
ActiveSheet.PivotTables("PivotTable3").PivotCache.Refresh
I also have 2 other worksheets, "PivotTable-products" and
"PivotTable-prices" which I would like to refresh when the same macro
is run. These however are not part of the active worksheet, so how do I
have these two pivot tables refresh by calling them from a different
worksheet?
I've tried a couple things, like:
Worksheets("PivotTable-products").PivotTables("PivotTable4").PivotCache.Refresh
which doesn't seem to work.
Any suggestions would be greatly appreciate!
Thanks- Mandy.