Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Query Table problem

Hi guys,

I have 2 query tables in one worksheet, in fact there's only 2 tables in
the whole workbook.

Here,s the code I use to refresh the table values..


Sheets("WEB QUERY").QueryTables(1).Connection =
"URL;http://lite.betfair.com/lite_view_market.asp?id=" & Range("y4")
Sheets("WEB QUERY").QueryTables(1).Refresh
Sheets("WEB QUERY").QueryTables(2).Connection =
"URL;http://lite.betfair.com/lite_view_market.asp?id=" & Range("y5")
Sheets("WEB QUERY").QueryTables(2).Refresh

The values in cells Y4 & Y5 are event numbers from the website data tables.

The problem being is that each day I keep having to swap the two ("y4") and
("y5") values around in this code.

Seemingly on a morning table (1) becomes table(2) and vice versa each
morning.

The cell values in Y4 & Y5 change throught the day, and they work perfectly
with the code that changes them.

It only happens once a day on the first refresh, after that they are fine.

I've tried naming the tables and substituting QueryTables(1) for
QueryTables(nameOne) etc but this didn't solve it, or I had the syntax
wrong.

Any help on this would be much appreciated.

Thanks,

Ron
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Query Table problem

Hi Guys,

Im still struggling with this problem, any ideas at all?



Ron
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
Problem with MS Query - can't edit query jarems Excel Discussion (Misc queries) 2 December 12th 05 09:42 AM
Problem in SQL Query Shilps Excel Programming 2 April 23rd 04 10:29 AM
Problem with .Background Query option of ODBC Query Shilps Excel Programming 0 April 19th 04 06:41 AM
Linking a table in Access to a table in Excel using MS Query Diana[_5_] Excel Programming 1 January 16th 04 09:43 PM
Query Table Problem Sherry[_4_] Excel Programming 2 November 28th 03 05:10 PM


All times are GMT +1. The time now is 05:37 PM.

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

About Us

"It's about Microsoft Excel"