Hi
Sub OpenUpdatePivotTablesSave()
Dim pt As PivotTable
Dim ws As Worksheet
Dim wb As Workbook
Set wb = Workbooks.Open("C:\Myfile.xls")
For Each ws In wb.Worksheets
For Each pt In ws.PivotTables
pt.RefreshTable
Next pt
Next ws
wb.Save
End Sub
--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music
"Dan" wrote:
I am looking for an automatic procedure to open a file (excel 2003), refresh
all pivot tables (olap cubes) and save it.
thanks