omit dialog box display during pivot table refresh (macro)

  • Thread starter Thread starter cm
  • Start date Start date
C

cm

I am using the following to refresh a pivot table:

Sheets("Summaries").PivotTables("PivotTable2").PivotCache.Refresh

This works properly; however if the table is receiving addtional rows during
the refresh, it displays a question asking the user if they want to update
the table (duh, yes we do).

How can I eliminate this dialog box?

cm
 
Patrick,
That was not successful. The message says exactly "Do you want to replace
the contents of the destination cells in Summaries?"

Any other ideas?

cm
 
I;m not sure what happened the first time, but it seems to be working now.
Thanks a bunch.

cm
 
Be sure you have turned Alerts back on when you're. Otherwise, the
user may not get messages that he should.

Application.DisplayAlerts = False
' your code
Application.DisplayAlerts = True

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Back
Top