Update Pivot Tables and the run Macro

  • I can auto update my pivot tables and I can run a macro but, I can't figure out how to write the code so that the pivot tables will update and then the macro will run. This may be easy but I am new to VBA and macros.


    My code looks like this:


    Private Sub Worksheet_Change(ByVal Target As Range)
    Worksheets("Box 1").PivotTables("PivotTable1").PivotCache.Refresh
    End Sub


    and


    Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("A1:A2000")) Is Nothing Then
    Call Refresh2
    End If
    End Sub

    Now I just need to figure out how to put those 2 together


    Thanks for you help in advance!


    -jmacsfhuffle

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!