Pause until MSNSTockQuote runs
As part of a macro, I am modifying several worksheets and the modification
includes adding a column of about 30 rows with the function of the form:
=MSNStockQuote($A6,"Last","US")
This command fetches data from the Internet.
After it runs, other cells are calculated.
I would like to know when the function has obtained the data, in all of the
rows, so that I can then "autosize" the columns. (If I don't wait, the columns
will be too small).
I know I can do something like a while/wend loop, but I don't know what to use
as a flag for this routine.
I could, for example, use the presence of real data in the bottommost row, but
if that happens to be a quote for which there happens to be no data; or if the
server is down; or if the macro is being run during the "5-minute" timeout of
the function, then my macro will "hang".
Any thoughts would be appreciated.
Thanks.
--ron
|