Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Query Table problem
Hi Guys,
Im still struggling with this problem, any ideas at all? Ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with MS Query - can't edit query | Excel Discussion (Misc queries) | |||
Problem in SQL Query | Excel Programming | |||
Problem with .Background Query option of ODBC Query | Excel Programming | |||
Linking a table in Access to a table in Excel using MS Query | Excel Programming | |||
Query Table Problem | Excel Programming |