Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To Finish pivot table refresh before cont. VBA code
First off, thanks for all the help from everyone in getting me this far!!
I'm so close to finishing this but have one problem, I'm trying to Auto_run a macro in a different workbook that opens an existing file, refreshes the pivot table, saves, then closes excel completely. My only problem is that my code trys to close excel before the refresh is complete. How can I tell it to finish the refresh operation before continuing? THANKS!!! ChDir "T:\Data\" Workbooks.Open Filename:= _ "T:\Data\file.xls" ActiveSheet.PivotTables("PivotTable1").RefreshTabl e ActiveWorkbook.Save ActiveWindow.Close Set excelApp = GetObject(, "Excel.Application") excelApp.Quit End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA code to refresh Child Pivot Table | Excel Discussion (Misc queries) | |||
Create refresh button in worksheet to refresh Pivot Table Data | Excel Worksheet Functions | |||
refresh a new worsheet on pivot table refresh | Excel Worksheet Functions | |||
Sheet protection code conflicts with Pivot Table "auto refresh" | Excel Discussion (Misc queries) | |||
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH | Excel Programming |