Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default Automatic refresh of pivot tables

I am looking for an automatic procedure to open a file (excel 2003), refresh
all pivot tables (olap cubes) and save it.
thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 396
Default Automatic refresh of pivot tables

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default Automatic refresh of pivot tables

Thanks Wigi. it works


"Wigi" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Refresh Pivot Tables Babs in Ohio Excel Worksheet Functions 0 July 18th 07 02:40 PM
Pivot Tables Refresh Janet BN Excel Discussion (Misc queries) 3 February 12th 07 11:28 PM
Excel Pivot tables refresh Dkso Excel Worksheet Functions 3 July 3rd 05 04:55 PM
Refresh all pivot tables in a workbook nc Excel Discussion (Misc queries) 3 June 22nd 05 06:37 PM
refresh pivot tables through a macro dolph Excel Worksheet Functions 1 January 12th 05 04:16 AM


All times are GMT +1. The time now is 05:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"