Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XL 2010 Pivot Table Refresh Error

Status
Not open for further replies.

MeGustaXL

Technical User
Aug 6, 2003
1,055
0
0
GB
Hi,

My workbook has a total of 19 Pivot Tables, linked to various Data Tables. When I do a "Refresh All", a message pops up saying that "This Pivot Table is invalid...."
When I close and reopen the workbook, it gets repaired because of an "Invalid Pivot Table", and the xml report points to PivotTable8, but PT8 refreshes just fine from the ribbon and right-click Refresh buttons. I've tried deleting the entire PT and re-making it, but it still fails.

Any ideas?

Chris

Someday I'll know what I'm donig...damn!

 
Hi,

I think that I’ve seen something like this. It’s been during 25+ years.

But I do remember that I often looped through the PTs in my workbooks to refresh, rather than doing Refresh All.
Code:
Dim ws as Worksheet
Dim pt as PivotTable 

For Each ws In Worksheets
   For Each pt In ws.PivotTables
      With pt.PivotCache
         .MissingItemsLimit = xlMissingItemsNone
         .Refresh
      End With
   Next
Next

It may be overkill, but it seemed to work for me.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Thanks Skip, tried that and it Refreshed them all nicely, but closing and reopening still kicks off a repair of PivotTable8, even though the entire tab with it on has been deleted [thumbsdown]

Chris

Someday I'll know what I'm donig...damn!

 
@MwGustaXL,

Did you do anything with the MissingItemsLimit property?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Hi Skip,

I did try your code, but I still get this error on re-opening:

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<recoveryLog xmlns="<logFileName>error111400_02.xml</logFileName><summary>Errors were detected in file 'C:\Users\****** .xlsm'
</summary><repairedRecords summary="Following is a list of repairs:">
<repairedRecord>Repaired Records: PivotTable report from /xl/pivotTables/pivotTable8.xml part (PivotTable view)</repairedRecord>
</repairedRecords>
</recoveryLog>

Even when I deleted Pivot table 8, it came up with the same error....

Many Thanks.
 
You may still have a PivotCache. Do you have other PTs in your workbook?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Skip,

Sorry for the delay but we've been diverted for the last few days.
Tweenster and I have tried the Missing Items property and clearing the Pivot Caches, manually and by VBA, but the error still occurs every time the WS is opened.
Any chance it could be due to the sheer gigantic size of the workbook?



Chris

Someday I'll know what I'm donig...damn!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top