Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Refreshing Web Query Problem

Dear All,

this seems like a common problem, but I have not seen a definiate
solution yet - so any help would be most appreciated.

I have some code that does a vlookup where the source data is via a web
query. Occassionally I need to refresh the web query to update the
data.

However, it appears that the code completes before the page is
refreshed, so the old data is still used in the vlookup.

When I manually step through the process (F8) it completes perfectly as
I presume the extra time I take enables the web query to refresh in
time.

Any ideas how I can ensure that the refreshing is completed before the
remainder of the code is finalised?

Regards,

andym

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Refreshing Web Query Problem

Make sure the QueryTable.BackgroundQuery property is set to False. Can be
done wither in code or by right-clicking on the querytable result range and
choosing Properties. Background queries allow other processing to occur
before the results are returned.

--
- K Dales


"andym" wrote:

Dear All,

this seems like a common problem, but I have not seen a definiate
solution yet - so any help would be most appreciated.

I have some code that does a vlookup where the source data is via a web
query. Occassionally I need to refresh the web query to update the
data.

However, it appears that the code completes before the page is
refreshed, so the old data is still used in the vlookup.

When I manually step through the process (F8) it completes perfectly as
I presume the extra time I take enables the web query to refresh in
time.

Any ideas how I can ensure that the refreshing is completed before the
remainder of the code is finalised?

Regards,

andym


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refreshing Data from a web query smith_gw Excel Discussion (Misc queries) 0 April 25th 07 10:44 PM
problem refreshing data query on yahoos jcoudrie0734 Excel Discussion (Misc queries) 0 October 4th 05 12:14 AM
Help! Query Refreshing Emma Hope Excel Programming 2 September 19th 05 05:28 PM
Parameter Query not refreshing. MER Excel Programming 3 May 26th 05 09:15 PM
get new file name when refreshing query gaba Excel Programming 0 November 12th 04 05:54 PM


All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"