View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
HKS HKS is offline
external usenet poster
 
Posts: 10
Default Macro to Refresh child pivot table

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.
However I always have debug error in the following code. What did I do wrong
here?

Set vTableChild = ActiveCell.PivotTable
Worksheets(vWSMain).PivotTableWizard SourceType:=xlPivotTable,
SourceData:=vTableParent1

Worksheets(vWSChild).PivotTables(vTableChild).Pivo tCache.BackgroundQuery =
True

Thanks