ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Suspend program for data retrieval (https://www.excelbanter.com/excel-programming/395077-suspend-program-data-retrieval.html)

bac

Suspend program for data retrieval
 
Xp SP2; MSO 2003

I need to suspend VBA code in Excel until a web query finishes downloading
data into a .txt file on my local drive.

I found a way to do that for Access VBA by looking for the file, but my
problem here is that the file gets created, then it could take from several
seconds to several minutes to download, especially when users are remoting in
to a distant server from their home.

Since the file size varies, I can't
Do until newfile.size = ???
since it may never get to ??? or ??? may end up being only 1/3 of the data.

Is there a way to ensure the download has completed and the file is closed,
that I can test for before allowing the code to proceed?

TIA
BAC


All times are GMT +1. The time now is 06:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com