![]() |
Pivot Table
Hi,
I have like 8 pivot tables in a some sheet. Is it possible to have just one update button to update all tables at a time? Thanks JPG |
Pivot Table
Press Alt+F11 to open the VBE and then click INSERT in the menu and select
MODULE. Enter the following sub Sub GlobalUpdate() Dim pt As PivotTable Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets For Each pt In ws.PivotTables pt.Update Next pt Next ws Set pt = Nothing Set ws = Nothing End Sub Save the module, click FILE in the menu and select CLOSE AND RETURN TO EXCEL. Then modify a toolbar and assign the macro named GlobalUpdate to a toolbar button -- Kevin Backmann "juanpablo" wrote: Hi, I have like 8 pivot tables in a some sheet. Is it possible to have just one update button to update all tables at a time? Thanks JPG |
Pivot Table
Ok great, thanks.
When I execute the macro, insuficient memory :( Any ideas how to improve? Regards JPG "Kevin B" wrote: Press Alt+F11 to open the VBE and then click INSERT in the menu and select MODULE. Enter the following sub Sub GlobalUpdate() Dim pt As PivotTable Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets For Each pt In ws.PivotTables pt.Update Next pt Next ws Set pt = Nothing Set ws = Nothing End Sub Save the module, click FILE in the menu and select CLOSE AND RETURN TO EXCEL. Then modify a toolbar and assign the macro named GlobalUpdate to a toolbar button -- Kevin Backmann "juanpablo" wrote: Hi, I have like 8 pivot tables in a some sheet. Is it possible to have just one update button to update all tables at a time? Thanks JPG |
Pivot Table
I don't know how your pivot tables have been created, but if they're all
using the same pivot data you can conserve by using an existing pivot table as the data source for the next pivot table you create. Any time you can reference an existing pivot table as a data source you'll be conserving resources. The only other thing that I can think of is close all unnecessary applications, or get additional RAM for your PC. -- Kevin Backmann "juanpablo" wrote: Ok great, thanks. When I execute the macro, insuficient memory :( Any ideas how to improve? Regards JPG "Kevin B" wrote: Press Alt+F11 to open the VBE and then click INSERT in the menu and select MODULE. Enter the following sub Sub GlobalUpdate() Dim pt As PivotTable Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets For Each pt In ws.PivotTables pt.Update Next pt Next ws Set pt = Nothing Set ws = Nothing End Sub Save the module, click FILE in the menu and select CLOSE AND RETURN TO EXCEL. Then modify a toolbar and assign the macro named GlobalUpdate to a toolbar button -- Kevin Backmann "juanpablo" wrote: Hi, I have like 8 pivot tables in a some sheet. Is it possible to have just one update button to update all tables at a time? Thanks JPG |
All times are GMT +1. The time now is 10:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com