Prevent msg box when updating Pivot Table by macro? (DisplayAlerts = False doesn't work)
Posted by Catherine Munro on February 07, 2002 1:18 PM
I have summary data in a pivot table, based on frequently changing source data. I use a macro to refresh the pivot table when source changes (PivotTables("PivotTable1").RefreshTable). It works beautifully except for one thing -- when the new pivot table contains more rows than the old, I get a message box reading "Do you want to replace the contents of the destination cells?"
The answer should always be Yes, but no matter where I place "DisplayAlerts = False" within the code, I get this box when I reach the RefreshTable line. Is there another way to tell it to overwrite, or to send a "Yes" and prevent that msg box from displaying?
A little bit batty,
Catherien