locked
Multiple Pivot Table Filter Update RRS feed

  • Question

  • I created some code that changes the filter selected on PivotTable1 to the other 9 Pivots on the same worksheet, but I had to create a button to trigger the macro. I've done VBA in Access and know that there is a AfterUpdate trigger, does excel have this to? I want to run the macro after the filter selection has been made in the pivot table. Thanks MAS
    Friday, November 20, 2009 7:22 PM

Answers

  • Yes there is an event for that.
    you can use pivot table update event in that work sheet

    Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)

    '''''''''''''''''''''''if  you have single pivot table in that sheet you can leave the IF Statement.

       If Target.Name = "Your pivot table Name" Then

        '''''''''''''''''''''''write your code here for applying filters

       End If

    End Sub


    Thanks Dileep
    • Marked as answer by Tim Li Friday, November 27, 2009 3:12 AM
    Tuesday, November 24, 2009 6:22 AM