Hi, sometimes when I refresh a pivot table a dialog box pops up and asks 'Do you want to replace the contents of the destination cells..' This is really annoying since I refresh the pivot table within some code in a macro that runs automatically. Therefore when this diolog box comes up and asks this question, nothing else can happen until I answer it! Is there any way to make it either not ask me questions at all, or simply default to answering yes to it??? Please help! thanks very much
ps. I have tried it with both these different code options
Set pvtTable = Worksheets("Positions").Range("C9").PivotTable
pvtTable.RefreshTable
And this code does it too..
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
ps. I have tried it with both these different code options
Set pvtTable = Worksheets("Positions").Range("C9").PivotTable
pvtTable.RefreshTable
And this code does it too..
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh