View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Sean Connolly[_3_] Sean Connolly[_3_] is offline
external usenet poster
 
Posts: 25
Default Which runs first, Workbook_Open() or external query refresh?

As Tom Ogilvy also replied under a different thread, the following KB article
is probably also very useful here.

http://support.microsoft.com/support.../q182/7/35.asp
XL97: How to Use the Query Before and AfterRefresh Events

Regards, Sean.

" wrote:

I want to process some data when the user opens a spreadsheet, but not
until an external Access query has been refreshed.

"Refresh data on file open..." has been checked in the data range
properties. But I think my Workbook_Open() code is running before auto
refresh happens.

Where is the best place to put code to ensure that it runs after the
external MS-Query has been updated?

As a last resort, I could have the user press a button after all data
has been refreshed, but that is messy.

Thanks in advance....
...df