ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   omit dialog box display during pivot table refresh (macro) (https://www.excelbanter.com/excel-programming/433759-omit-dialog-box-display-during-pivot-table-refresh-macro.html)

CM

omit dialog box display during pivot table refresh (macro)
 
I am using the following to refresh a pivot table:

Sheets("Summaries").PivotTables("PivotTable2").Piv otCache.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 Molloy[_2_]

omit dialog box display during pivot table refresh (macro)
 
try
Application.DisplayAlerts = False

"cm" wrote:

I am using the following to refresh a pivot table:

Sheets("Summaries").PivotTables("PivotTable2").Piv otCache.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


CM

omit dialog box display during pivot table refresh (macro)
 
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


"Patrick Molloy" wrote:

try
Application.DisplayAlerts = False

"cm" wrote:

I am using the following to refresh a pivot table:

Sheets("Summaries").PivotTables("PivotTable2").Piv otCache.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


CM

omit dialog box display during pivot table refresh (macro)
 
I;m not sure what happened the first time, but it seems to be working now.
Thanks a bunch.

cm

"Patrick Molloy" wrote:

try
Application.DisplayAlerts = False

"cm" wrote:

I am using the following to refresh a pivot table:

Sheets("Summaries").PivotTables("PivotTable2").Piv otCache.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


Chip Pearson

omit dialog box display during pivot table refresh (macro)
 
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)

On Thu, 17 Sep 2009 09:45:02 -0700, cm
wrote:

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

cm

"Patrick Molloy" wrote:

try
Application.DisplayAlerts = False

"cm" wrote:

I am using the following to refresh a pivot table:

Sheets("Summaries").PivotTables("PivotTable2").Piv otCache.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



All times are GMT +1. The time now is 09:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com