omit dialog box display during pivot table refresh (macro)

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
 
C

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
 
C

cm

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

cm
 
C

Chip Pearson

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top