Refresh of pivot tables

  • Thread starter Thread starter Mick Wilcox
  • Start date Start date
M

Mick Wilcox

Hi
I have a spreadsheet that uses MS Query to refresh several pages from an SQL
Server Help Desk database. This works fine - all queries are set to refresh
on open. I also have pivot tables on a separate sheets based on each
resultant page. Even though the pivots are set to auto refresh they don't
(or I suspect they refresh on open from 'old' data on the still refreshing
database linked pages. Any ideas for making the pivot tables wait until the
data's changed before refreshing?

Mick
 
I think links are refreshed when an file is open, prior to the
ThisWorkbook's Workbook Open event.

So you can include the following in that event:

Private Sub Workbook_Open()
ActiveSheet.PivotTables("PivotTable1").RefreshTable
End Sub
 
Back
Top