Hello,
I'm new to the VBA world, so any help with this would be appreciated! Curious if it is possible to auto filter directly on a Pivot Chart based on a cell value. I found code to accomplish this with pivot tables but it does not seem to work with a pivot chart - but it is entirely possible I am doing something wrong. Also, my target range contains a formula which I suspect may be an issue. Here is what I am using, any help would be appreciated. Thank you!

Private Sub Worksheet_Change(ByVal Target As Range)

Dim xPTable As PivotTable
Dim xPFile As PivotField
Dim xStr As String
On Error Resume Next
If Intersect(Target, Range("B8")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Set xPTable = Worksheets("Sheet2").PivotTables("repchart")
Set xPFile = xPTable.PivotFields("rep_wwid")
xStr = Target.Text
xPFile.ClearAllFilters
xPFile.CurrentPage = xStr
Application.ScreenUpdating = True
End Sub