PDA

View Full Version : Time lapse



nicolaforni
09-28-2010, 10:46 AM
I would like to copy CELL B3 wait 10 seconds and copy it onto CELL B4.

Thanks,
Nick

Bob Phillips
09-28-2010, 11:25 AM
I cannot see the rationale behind this. Why not just wait 10 seconds then copy and paste?

nicolaforni
09-29-2010, 03:13 AM
Fair enough.
There is a formula that downloads prices in Excel from a financial data source. This takes a few seconds. My problem is that if I run a macro that refreshes formula for price download and then goes on to do some calculations the calculations are incorrect because we have not given enough time for all prices to be downloaded. My idea was to have a macro that downloads prices and then only after 10 seconds have the next part of the macro kicking in so we are sure that all data downloaded and the calculations will be correct. So basically I need a way to have some time lapse between two parts of macro. Hope now it is clear. One solution would be to break macro in two parts and run them separately but was wondering whether one could have one macro giving same result. Thanks! Nick

Bob Phillips
09-29-2010, 03:24 AM
Okay, take a look at Application.Wait in VBA help.

lynnnow
09-29-2010, 04:31 AM
If you are setting a macro to download data, why not use the readystate option and then trigger the rest of the data after that?