LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Batch Pivot Table update

Could someone tell me why if I do a Pivot "Source Change All" with VBA the code does update only 1 source instead of the 2 on 1 specific sheet?

Tab Sidel NAN0 100 Pivot Table dynamique2 C:\Name_fruits\Name\[Name rapports de fruits 2012-2013 .xls]Sidel_Nano'!C1:C20

This is the unchanged source(look at the year):
Tab Sidel NAN0 100 Pivot Table dynamique35 C:\Name_fruits\Name\[Name rapports de fruits 2011-2012 .xls]Sidel_Nano'!C1:C20

This is part of the code:
For Each ws In wb.Worksheets
For Each pt In ws.PivotTables
tmp = pt.SourceData
strSD = Replace(tmp, "2011-2012", "2012-2013")
pt.ChangePivotCache _
wb.PivotCaches.Create(SourceType:=xlDatabase, _
SourceData:=strSD)
Next pt
Next ws

Thank's ahead!
 
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
Pivot Table Update Dale Excel Discussion (Misc queries) 6 October 25th 09 09:00 PM
batch update excel with add-in [email protected] Excel Programming 0 November 22nd 08 04:53 AM
Pivot Table update Talheedin Excel Discussion (Misc queries) 0 August 23rd 06 11:05 AM
VBA to update Pivot table JR Excel Programming 3 May 15th 06 02:01 PM
Update Batch MichaelS_[_4_] Excel Programming 2 January 31st 06 09:07 AM


All times are GMT +1. The time now is 03:24 AM.

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

About Us

"It's about Microsoft Excel"