Finish one App before closing??

G

graham

How do I get this to finish the refreshing the pivot table before trying to save and then close excel???

THANKS IN ADVANCE!!!!!

Sub Auto_Open()
'
' Auto_Open Macro
' Macro recorded 6/23/2004 by Tetris
'

'
ChDir "T:\Data"
Workbooks.Open Filename:= _
"T:\Data\test.xls"
ActiveSheet.PivotTables("PivotTable1").RefreshTable
ActiveWorkbook.Save
ActiveWindow.Close
Set excelApp = GetObject(, "Excel.Application")
excelApp.Quit
End Sub
 
Top