Hi,
I have a spreadsheet with a number of sheets in it for our sales team to record orders received and pending; the first sheet contains pivots which relate to the other sheets (a sheet for each financial quarter) (i.e. one pivot for sheet 2, one pivot for sheet 3 etc)
Is there a macro which will allow me to update all of the pivots when the workbook is opened? Or, even better, one where they will be updated when the first sheet is accessed?
The only one I have found when searching is:
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
but that one doesn't work (and I'm not good enough with Macros to know what I should be changing to fit my worksheet)
And then...
This workbook is being replicated four times (for the four different business sectors in our company), and I have a summary spreadsheet for our Sales director which will combine the pivots in the four spreadsheets. Is there a macro which will do the same thing as above? (i.e. update the pivots which have been taken from a different workbook?)
Many thanks in advance for your help!
Bookmarks