View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 126
Default AUTO_OPEN and Automatic Data Refresh

How about this approach?

Turn off the automatic data refresh.

Then, the auto_open (or Workbook_Open) code can refresh each of the
PivotCaches and QueryTables. This way you know when the last refresh
completes!

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005

In article , says...
We have a workbook with queries bound to a few of the sheets. Once the
queries have automatically refreshed, I'd like a macro to run. AUTO_OPEN
macros appear to run before the data is refreshed. Any thoughts on how to
accomplish this?

I thought I might have the AUTO_OPEN macro check to see if the queries were
done and remain in a wait loop until the queries finished but I can't find
the dbengine in the object model and I'm not sure if it supports a "busy"
status, anyway. I thought I might just probe a known cell to see if the
queries were complete but that seems like an awfully awkward way to do this.

So, I'm looking for ideas. Any suggestions would be appreciated.