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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top