Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code to refresh Child Pivot Table HKS Excel Discussion (Misc queries) 0 May 7th 08 07:49 PM
Create refresh button in worksheet to refresh Pivot Table Data Ron Excel Worksheet Functions 1 October 13th 07 01:20 AM
refresh a new worsheet on pivot table refresh [email protected] Excel Worksheet Functions 0 February 9th 07 07:39 PM
Sheet protection code conflicts with Pivot Table "auto refresh" KG Excel Discussion (Misc queries) 6 December 21st 05 11:16 PM
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH Ken Roberts Excel Programming 3 September 11th 03 06:02 AM


All times are GMT +1. The time now is 05:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"