macro updating imported data and pivot tables

  • Thread starter Thread starter Cam
  • Start date Start date
C

Cam

Hello,

I have a sheet named "Data" with data imported from Access, then a pivot
table and pivot chart sheets from the source "Data" sheet. What do I put in
the code to first refresh the "Data" sheet first, then update all the pivot
table sheets and charts?
I tried this code, but it only refresh the "Data" sheet, but not the pivot
table.

Thisworkbook.refreshAll

Thanks
 
I typically use the command ActiveWorkbook.RefreshAll, but you need to make
sure that you do NOT allow enable background refresh, or the pivot table will
"update" before the "Data" sheet has fully refreshed.
 
Back
Top