Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Remove field from the Pivot Table

$
0
0

hi,

I would like to remove names from my columns in my pivot table.

i used the code below but i receive the error "

Unable to get the pivotField property of the pivot table class.

please kindly advise what am i doing wrong?

thanks you Vered 

Sub Remove_Name()

Dim PTfield As PivotField

Set PTfield = ActiveSheet.PivotTables(1).PivotFields("Name")
With PTfield
    .ClearAllFilters
    .PivotFilters.Add xlCaptionEquals, , "Verif"
End With

End Sub


Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>