H
HKS
In one workbook, I have three parent pivot tables and ten child pivot tables.
I want a macro to refresh these child tables from different parent tables. I
wrote a macro and it always has the runtime error in the following code
(second row of the code). Any advise/idea?
Dim vWSMain as Parent PivotTable worksheet
Dim vWSChild as Child PivotTable worksheet
Dim vTableChild as Child PivotTable
Dim vTableParent1 as Parent PivotTable #1
Set vTableChild = ActiveCell.PivotTable
Worksheets(vWSMain).PivotTableWizard SourceType:=xlPivotTable, _
SourceData:=vTableParent1
Worksheets(vWSChild).PivotTables(vTableChild).PivotCache.BackgroundQuery =
True
Thanks
I want a macro to refresh these child tables from different parent tables. I
wrote a macro and it always has the runtime error in the following code
(second row of the code). Any advise/idea?
Dim vWSMain as Parent PivotTable worksheet
Dim vWSChild as Child PivotTable worksheet
Dim vTableChild as Child PivotTable
Dim vTableParent1 as Parent PivotTable #1
Set vTableChild = ActiveCell.PivotTable
Worksheets(vWSMain).PivotTableWizard SourceType:=xlPivotTable, _
SourceData:=vTableParent1
Worksheets(vWSChild).PivotTables(vTableChild).PivotCache.BackgroundQuery =
True
Thanks