Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub RefreshButton_Click()
ActiveSheet.PivotTables("NewPT1").PivotCache.Refre sh ActiveSheet.PivotTables("NewPT2").PivotCache.Refre sh End Sub When the above procedure runs, when the PivotTable is larger than the last one, I get a dialog box asking me if I wish to overwrite the existing cells, even though the existing cells are blank. Is there a way I can avoid this, either by adding to my code, or some additional property of the pivoit tables? EA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry for not fully trusting you : are the cells it is trying to expand
into really empy? Have any of them got carriage returns in them? Try Range ("C13:D15").ClearContents in the immediate window on the area it is trying to expand into an dthen run the code. j On 1 Dec, 11:58, "EA" wrote: Private Sub RefreshButton_Click() ActiveSheet.PivotTables("NewPT1").PivotCache.Refre sh ActiveSheet.PivotTables("NewPT2").PivotCache.Refre sh End Sub When the above procedure runs, when the PivotTable is larger than the last one, I get a dialog box asking me if I wish to overwrite the existing cells, even though the existing cells are blank. Is there a way I can avoid this, either by adding to my code, or some additional property of the pivoit tables? EA |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The cells are most definitely empty.
The size of the Pivot table expands as the day of the month increases. At the end of the month there are 30/31 days worth of info. At the start of next month the number reduces to one. Then on every subsequent refresh, as more days are added, the dialog box appears... EA "WhytheQ" wrote in message ps.com... Sorry for not fully trusting you : are the cells it is trying to expand into really empy? Have any of them got carriage returns in them? Try Range ("C13:D15").ClearContents in the immediate window on the area it is trying to expand into an dthen run the code. j On 1 Dec, 11:58, "EA" wrote: Private Sub RefreshButton_Click() ActiveSheet.PivotTables("NewPT1").PivotCache.Refre sh ActiveSheet.PivotTables("NewPT2").PivotCache.Refre sh End Sub When the above procedure runs, when the PivotTable is larger than the last one, I get a dialog box asking me if I wish to overwrite the existing cells, even though the existing cells are blank. Is there a way I can avoid this, either by adding to my code, or some additional property of the pivoit tables? EA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Button that refreshes all pivot tables at once | Excel Discussion (Misc queries) | |||
Pivot Table Refreshes | Excel Programming | |||
Help with Pivot Table Code Please | Excel Programming | |||
Pivot Table Code | Excel Discussion (Misc queries) | |||
VBA Code for a pivot table to open database and to reference table current page | Excel Programming |