Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to update datasources of a pivot table ?

Hi everyone !

My database is changing everyday (adding and removing of lines)
I've got some pivot tables linked with this database in the same workbook.

I want the VBA code to update the datasource range for my pivot table.

I've wrote this code but I can't understand why it is not the main pivot
table that's updating but another one is created bottom side. this last one
has got the updated datasource.

Thanks to help me !!!

'Sheets(tab1).PivotTableWizard SourceType:=xlDatabase,
SourceData:=Sheets("databasis").Range("A17:BJ" &
Sheets("DataBasis").UsedRange.Rows.Count),
TableDestination:=Sheets(tab1).Range("A3")
'Sheets(tab1).PivotTables("Tableau croisé dynamique1").PivotCache.Refresh

--
olivier
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default How to update datasources of a pivot table ?

ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh


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
Pivot Table Update Dale Excel Discussion (Misc queries) 6 October 25th 09 09:00 PM
Pivot Table update johnsail Excel Discussion (Misc queries) 8 March 26th 09 08:55 PM
Pivot Table Update Lambi000 Excel Discussion (Misc queries) 1 January 30th 08 08:08 PM
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


All times are GMT +1. The time now is 03: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"