G
Guest
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
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