Hi I tried to update my pivot table using the below code. Every thing is fine when this excel file alone opened.
When there was multiple excel file this macro is not getting disabled again and again the same file is opening.
can u give me solution for this....
Sub Auto_Open()
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
Bookmarks