ItIsHardToProgram
Technical User
Hello everyone,
I have mentioned this earlier in another post, where we found a fix that seemed to work, but the file decided that it started RECREATING ghosts again, in my data, and my clear cache method dosnt seem to be removing them.
Is there a way to COMPLETLY rewrite cache, before every procedure.
I have a print macro that prints data, thats what seems to be creating the ghosts, there is probably a reason for that, a reason that I don't know.
Please help me this issue is really getting on my wrong side.
Here is the macro to clear cache.
Here is what the print macro does:
If any one could help me with this issue I would be very happy, ghost that are created replace data with otehr data (only in the pivot table) and they also create data that doesnt exist, for example, pembroke creates pembroke2, but there is no pembroke2.
ALSO there is a weird parcel of data that represents nothing and appears as a blank.
The data is not reflected in any category of my pivot table.
Im thinking this is corruption and im hoping not.
Can you find me a fix, beside redo the pivot table everytime???
Thank you
Julien,
"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
I have mentioned this earlier in another post, where we found a fix that seemed to work, but the file decided that it started RECREATING ghosts again, in my data, and my clear cache method dosnt seem to be removing them.
Is there a way to COMPLETLY rewrite cache, before every procedure.
I have a print macro that prints data, thats what seems to be creating the ghosts, there is probably a reason for that, a reason that I don't know.
Please help me this issue is really getting on my wrong side.
Here is the macro to clear cache.
Code:
Sub CleanMyPivots()
'SkipVought/2007 Apr 30/817-280-5438
'--------------------------------------------------
'cleans up pivot tables having OLD/UNUSED data hanging around.
'--------------------------------------------------
Dim pc As PivotCache
For Each pc In ActiveWorkbook.PivotCaches
pc.MissingItemsLimit = xlMissingItemsNone
pc.Refresh
Next
End Sub
Here is what the print macro does:
Code:
Sub ImpressionQuebec()
CleanMyPivots
On Error Resume Next
Dim pvi As PivotItem
Dim PviName() As String
Dim NamePVI
Call SortRes(PviName)
If ActiveWorkbook.Sheets("États").Range("$B$2:$B$2").Value = "Fonds I" Then
Application.ScreenUpdating = False
With Sheets("États")
With .PivotTables("EtatsFinancier")
.PivotFields("Résidence").CurrentPage = "(Tous)"
.PivotFields("Région").CurrentPage = "(Tous)"
.PivotFields("VPR").CurrentPage = "Renée"
Sheets("ÉtatsRésultat").PrintOut Copies:=1, Collate:=True
For Each NamePVI In PviName
.PivotFields("Résidence").CurrentPage = NamePVI
Select Case NamePVI
Case "StGeorges", "Atrium", "Saguenay", "Jonquiere", "Cascades", _
"RiveSud", "Archer", "Estrie"
Sheets("ÉtatsRésultat").PrintOut Copies:=1, Collate:=True
If NamePVI = "Archer" Then Exit Sub
'MsgBox (NamePVI)
Case Else
'Sheets("ÉtatsRésultat").PrintOut Copies:=1, Collate:=True
'MsgBox (pvi.Value)
End Select
Next
End With
End With
Application.ScreenUpdating = True
End If
Cleanmypivots
End sub
If any one could help me with this issue I would be very happy, ghost that are created replace data with otehr data (only in the pivot table) and they also create data that doesnt exist, for example, pembroke creates pembroke2, but there is no pembroke2.
ALSO there is a weird parcel of data that represents nothing and appears as a blank.
The data is not reflected in any category of my pivot table.
Im thinking this is corruption and im hoping not.
Can you find me a fix, beside redo the pivot table everytime???
Thank you
Julien,
"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.