PDA

View Full Version : run code after finishing web query load



anandbohra
07-27-2009, 12:36 AM
Hi all,

I have a procedure which I want to run only after updating web query in sheet2. but I don't konw how to write code which first check whether web query finished loading in sheet2 without error.

If finished without error then execute macro1 else say problem in finished web query.

hope u got my query.

Jan Karel Pieterse
07-27-2009, 03:41 AM
You can refresh a query synchronouosly from VBA so the next line will not be exectuted before the refresh is done:

Activecell.QueryTable.Refresh BackgroundQuery:=False