Macro finishes before External data fetch completes


Posted by Peter Murray on September 16, 1999 3:29 AM

I use a macro to refresh external data fetches - this can take 10 to 15 minutes depending upon traffic. I need to recalc at the end of the process, but can't find a way of making the macro wait for the data fetch to end before issuing the recalc command. Can anybody suggest anything as I want to automate this spreadsheet so that no manual interevention is required apart from hitting the macro button.

Posted by Ivan Moala on September 16, 1999 7:43 AM

Peter,
How are you fetching this external data ?
via ODBC data source, a URL that enables Microsoft Excel to connect to a Web data source or a file that specifies a database or Web query ? or DDE link ??
If so then I think there shold be a property
"BackgroundQuery" and that setting this to False will
return control to the procedure after your data has been fetched to the worksheet.


Ivan



Posted by Peter Murray on September 17, 1999 1:24 AM


Thanks Ivan,

That did just what I wanted!

Peter