Hi,
I have a Pivot table (PT) and I will clear all missing items in the PT by the below code. But I want to clear only row labels and not the column labels.
Sub DeleteMissingItems2002All()
Dim pt As PivotTable
Dim ws As Worksheet
Dim pc As PivotCache
For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.PivotCache.MissingItemsLimit = xlMissingItemsNone
Next pt
Next ws
For Each pc In ActiveWorkbook.PivotCaches
On Error Resume Next
pc.Refresh
Next pc
End Sub
Please help me in this regard.
I have a Pivot table (PT) and I will clear all missing items in the PT by the below code. But I want to clear only row labels and not the column labels.
Sub DeleteMissingItems2002All()
Dim pt As PivotTable
Dim ws As Worksheet
Dim pc As PivotCache
For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.PivotCache.MissingItemsLimit = xlMissingItemsNone
Next pt
Next ws
For Each pc In ActiveWorkbook.PivotCaches
On Error Resume Next
pc.Refresh
Next pc
End Sub
Please help me in this regard.