ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Posting data from worksheet to webquery ?? (https://www.excelbanter.com/excel-programming/388706-posting-data-worksheet-webquery.html)

[email protected]

Posting data from worksheet to webquery ??
 
Can anyone tell me some macro code to send data from say cell A10 to a
web query to be placed in sheet2 in cell A1 if it's possible.

The webquery page would be something like http://localhost/test.php?query=(text
in cell A10 sheet1)

Thanks


Vergel Adriano

Posting data from worksheet to webquery ??
 
here's one way:

Dim qry As QueryTable
With Sheets("Sheet2")
Set qry =
..QueryTables.Add(Connection:="URL;http://localhost/test.php?query=" &
Sheets("Sheet1").Range("A10").Text, Destination:=.Range("A1"))
qry.Refresh
End With



--
Hope that helps.

Vergel Adriano


" wrote:

Can anyone tell me some macro code to send data from say cell A10 to a
web query to be placed in sheet2 in cell A1 if it's possible.

The webquery page would be something like http://localhost/test.php?query=(text
in cell A10 sheet1)

Thanks



[email protected]

Posting data from worksheet to webquery ??
 
Thanks for that Vergel it works a treat.



All times are GMT +1. The time now is 07:21 PM.

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