E
Excel Rookie
Hi
I got tired of keep create the new pivot table every time there're new data
in the sheet. Therefore, I use the following code in the macro to update but
it keeps giving an error '!UpdateIt' cannot be found ??? ~ PLS HELP !
Sub Autpen()
Application.OnSheetActivate = "UpdateIt"
End Sub
Sub UpdateIt()
Dim iP As Integer
Application.DisplayAlerts = False
For iP = 1 To ActiveSheet.PivotTables.Count
ActiveSheet.PivotTables(iP).RefreshTable
Next
Application.DisplayAlerts = True
End Sub
Thanks,
Excel Rookie
I got tired of keep create the new pivot table every time there're new data
in the sheet. Therefore, I use the following code in the macro to update but
it keeps giving an error '!UpdateIt' cannot be found ??? ~ PLS HELP !
Sub Autpen()
Application.OnSheetActivate = "UpdateIt"
End Sub
Sub UpdateIt()
Dim iP As Integer
Application.DisplayAlerts = False
For iP = 1 To ActiveSheet.PivotTables.Count
ActiveSheet.PivotTables(iP).RefreshTable
Next
Application.DisplayAlerts = True
End Sub
Thanks,
Excel Rookie