ActiveWorkbook.RefreshAll waiting time

V

Vit

Hi all!

I'm working with Excel 2007 and using the data connection function to
connect to a SQL server as a source...

I'm woking on a VBA code that have to update the connection and
perform some calculation on the data....

unfortunately, the updating process (ActiveWorkbook.RefreshAll) is not
finished when the code is performng the calculation...

it is possble to insert a "waiting time" after the
ActiveWorkbook.RefreshAll ????

any other suggetion???

thanks all

cheers

Vit
 
B

brian.baulsom

You could try the one-liner
DoEvents
or - for 10 seconds -
Application.Wait Now + TimeValue("00:00:10")
 
V

Vit

Thanks for your replay, I have understod the Application.wait Now +
TimeValue("00:00:10")

but how can I be sure that the update process is finished???

what about DoEvent??? how does it work???

thank you so much....
vit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top