I had this code working for my pivot table/chart to update from a drop down list and its stopped working
Does anyone have any ideas why it has stopped working?
Does anyone have any ideas why it has stopped working?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Update 20190604
Dim xPTable As PivotTable
Dim xPFile As PivotField
Dim xStr As String
On Error Resume Next
If Intersect(Target, Target.Worksheet.Range("C6")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Set xPTable = Worksheets("Sheet3").PivotTables("CALLS_PIVOT")
Set xPFile = xPTable.PivotFields("PARENT_NAME")
xStr = Target.Text
xPFile.ClearAllFilters
xPFile.CurrentPage = xStr
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Set xPTable = Worksheets("Sheet3").PivotTables("MEETING_PIVOT")
Set xPFile = xPTable.PivotFields("PARENT_NAME")
xStr = Target.Text
xPFile.ClearAllFilters
xPFile.CurrentPage = xStr
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: