View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ellis Ellis is offline
external usenet poster
 
Posts: 5
Default Web query: Want to pause macro while Web query completes refre

Thanks. I'll try it; but I'm not sure the query continues to run while the
macro is.

I did get another suggestion which I tried and it works just fine. It was:

With Sheets("QtrData").QueryTables(1)
.BackgroundQuery = False
.Refresh
End With

--
Ellis Traub


"MSweetG222" wrote:

Try "Sleep"

Place at top of your Module (declare public or private depending on your
needs)...

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


Place in your code after query code line...

Call Sleep (3000) '(<<< try various #s to get correct # for your needs)


Hope this helps.
--
Thx
MSweetG222



"Ellis" wrote:

I have built a workbook that uses Web queries to populate pages with
financial data. The data is then used to populate other worksheets which
analyze the fundamentals of a company as a prospective investment.