Sub Update()
ActiveWorkbook.Save
Sheets("Planning").Select
Range("A5").Select
Application.Wait (Second(Now()) + 5)
ActiveSheet.PivotTables("POPivot").PivotCache.Refresh
Range("A12").Select
Application.Wait (Second(Now()) + 5)
ActiveSheet.PivotTables("LinePivot").PivotCache.Refresh
Range("B17").Select
Application.Wait (Second(Now()) + 5)
ActiveSheet.PivotTables("SOPivot").PivotCache.Refresh
Range("B23").Select
Application.Wait (Second(Now()) + 5)
ActiveSheet.PivotTables("ProdPivot").PivotCache.Refresh
Sheets("POs").Select
Application.Wait (Second(Now()) + 5)
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("Production").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("Picks").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("SOs").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("DateRange").Select
Range("A2").Select
End Sub
|