View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Michael Gill
 
Posts: n/a
Default Web Query: Obtaining source link from a cell

Hi,

Assuming cell A1 contains your URL just use the following code:
myQuery = Range("A1").Value
With ActiveSheet.QueryTables.Add(Connection:= _
myQuery _
, Destination:=Range("C4"))

Michael

"tx12345" wrote:


Hi

When I create a macro for a web query, the code looks like this:


Code:
--------------------
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.etc.com/mypage.htm" _
, Destination:=Range("C4"))

--------------------


But this macro is only good for one web page. How can I query another
web page without changing the macro, where the new web address come
from a particular cell on the worksheet?

All ideas welcome
Thx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=499068