web query based on cell value

  • Thread starter Thread starter daveB
  • Start date Start date
D

daveB

Is it possible to run a webquery based on a cell value in
VBA. In other words I want to substitute "www.myaddress"
in the code below with info that a user would input into
cell A1.

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.mywebaddress" _
, Destination:=Range("B2"))

I am new to VBA.

Thanks
 
try
myadd="whatever"
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www."&myadd&" _
, Destination:=Range("B2"))
 
Thanks Don, Worked great!
-----Original Message-----
try
myadd="whatever"
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www."&myadd&" _
, Destination:=Range("B2"))


--
Don Guillett
SalesAid Software
(e-mail address removed)



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top