Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pivot Tables
I have multiple pivot tables which are linked to data I
import into the Excel file. I would like to use "For each next" code to update all of the pivot tables in the file so I don't have to know the names of the pivot tables. I I use "for each next" for a lot of objects in Excel, but haven't had any luck with the code for a pivot table. Thanks, jc |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pivot Tables
The following code will refresh all pivot tables in the active workbook:
'============================ Sub RefreshAllPivots() Dim ws As Worksheet Dim pt As PivotTable On Error Resume Next For Each ws In ActiveWorkbook.Worksheets For Each pt In ws.PivotTables pt.RefreshTable Next Next End Sub '========================== jc wrote: I have multiple pivot tables which are linked to data I import into the Excel file. I would like to use "For each next" code to update all of the pivot tables in the file so I don't have to know the names of the pivot tables. I I use "for each next" for a lot of objects in Excel, but haven't had any luck with the code for a pivot table. Thanks, jc -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot tables - Editing the data source shared by multiple pivot ta | Excel Discussion (Misc queries) | |||
Building pivot tables in Excel 2007 based on existing pivot tables? | Excel Discussion (Misc queries) | |||
Pivot Table Data Adding contents of two pivot tables and param que | Excel Discussion (Misc queries) | |||
How does the term 'pivot' apply to Excel's Pivot tables and Pivot. | Excel Discussion (Misc queries) | |||
Pivot tables-controlling user interaction with pivot tables | Excel Programming |