Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I inherit a XLS file that has multiple pivottables, and no underlying data. I
have to refresh each of these tables one at a time. (yuck) is there an option I am missing? What VBA could I use to make this easier for me? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I took a stab at it, but I'm sure there is a more efficient way of doing this:
Sub Refresh_PivotTables() ' Select L2 Pivots Sheet and update Sheets("L2 Pivots").Select ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable2").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable3").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable4").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable5").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable6").PivotCache. Refresh ' Select Deskside Pivots shee and update Sheets("Deskside Pivots").Select ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable2").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable3").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable4").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable5").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable6").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable7").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable8").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable9").PivotCache. Refresh End Sub "Mike" wrote: I inherit a XLS file that has multiple pivottables, and no underlying data. I have to refresh each of these tables one at a time. (yuck) is there an option I am missing? What VBA could I use to make this easier for me? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe...
Option Explicit Sub DoThemAll() ThisWorkbook.RefreshAll End Sub Mike wrote: I took a stab at it, but I'm sure there is a more efficient way of doing this: Sub Refresh_PivotTables() ' Select L2 Pivots Sheet and update Sheets("L2 Pivots").Select ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable2").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable3").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable4").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable5").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable6").PivotCache. Refresh ' Select Deskside Pivots shee and update Sheets("Deskside Pivots").Select ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable2").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable3").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable4").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable5").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable6").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable7").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable8").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable9").PivotCache. Refresh End Sub "Mike" wrote: I inherit a XLS file that has multiple pivottables, and no underlying data. I have to refresh each of these tables one at a time. (yuck) is there an option I am missing? What VBA could I use to make this easier for me? -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks... its my first day.
"Dave Peterson" wrote: Maybe... Option Explicit Sub DoThemAll() ThisWorkbook.RefreshAll End Sub Mike wrote: I took a stab at it, but I'm sure there is a more efficient way of doing this: Sub Refresh_PivotTables() ' Select L2 Pivots Sheet and update Sheets("L2 Pivots").Select ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable2").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable3").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable4").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable5").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable6").PivotCache. Refresh ' Select Deskside Pivots shee and update Sheets("Deskside Pivots").Select ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable2").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable3").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable4").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable5").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable6").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable7").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable8").PivotCache. Refresh ActiveSheet.PivotTables("PivotTable9").PivotCache. Refresh End Sub "Mike" wrote: I inherit a XLS file that has multiple pivottables, and no underlying data. I have to refresh each of these tables one at a time. (yuck) is there an option I am missing? What VBA could I use to make this easier for me? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple PivotTables | Excel Discussion (Misc queries) | |||
Multiple PivotTables on one spreadsheet | Excel Discussion (Misc queries) | |||
[pivottables] multiple table selection fields update in one click... | Excel Discussion (Misc queries) | |||
How do I update a ODBC query in Excel using pivotTables in VBA? | Excel Programming | |||
Update pivottables | Excel Discussion (Misc queries) |