ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   web query based on cell value (https://www.excelbanter.com/excel-programming/295689-web-query-based-cell-value.html)

daveB

web query based on cell value
 
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

Don Guillett[_4_]

web query based on cell value
 
try
myadd="whatever"
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www."&myadd&" _
, Destination:=Range("B2"))


--
Don Guillett
SalesAid Software

"daveB" wrote in message
...
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




No Name

web query based on cell value
 
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

"daveB" wrote in

message
...
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



.


Don Guillett[_4_]

web query based on cell value
 
glad to help

--
Don Guillett
SalesAid Software

wrote in message
...
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

"daveB" wrote in

message
...
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



.





All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com