Last active
March 3, 2018 13:27
-
-
Save ateneva/98929ef8332c193f52ed937c8e61813c to your computer and use it in GitHub Desktop.
How can I check if I've got different pivot caches in my workbook?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub CountWbkCachesAndShowWbkSize() | |
Dim PC As PivotCache | |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
If ActiveWorkbook.PivotCaches.Count = 0 Then | |
MsgBox "The current workbook has 0 caches" | |
Else | |
'counts the number of PivotCaches | |
MsgBox "The current workbook has " & ActiveWorkbook.PivotCaches.Count & " caches" _ | |
& vbNewLine _ | |
& "The current workbook size is " & Round(FileLen(ActiveWorkbook.FullName) / 1048576, 2) & " MB" | |
End If | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment