Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
EA EA is offline
external usenet poster
 
Posts: 28
Default Pivot Table Refreshes Via Code

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Pivot Table Refreshes Via Code

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   Report Post  
Posted to microsoft.public.excel.programming
EA EA is offline
external usenet poster
 
Posts: 28
Default Pivot Table Refreshes Via Code

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Button that refreshes all pivot tables at once Edd Keelan Excel Discussion (Misc queries) 3 January 5th 07 03:23 PM
Pivot Table Refreshes EA Excel Programming 0 November 29th 06 09:10 PM
Help with Pivot Table Code Please nospaminlich Excel Programming 2 November 10th 06 10:36 PM
Pivot Table Code FA Excel Discussion (Misc queries) 6 October 11th 05 04:03 PM
VBA Code for a pivot table to open database and to reference table current page Pete Straman Straman via OfficeKB.com Excel Programming 0 February 21st 05 03:57 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"