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