I am trying to create an excel UDF that calls a web page that runs scripts which take values from parameters in the URL. EG: "http://example.com.com/script.php?variable1=123&variable2=456&etc=etc"
I have used this after much googling and trying things from other stackoverflow answers. yes it creates a udf, yes you can enter a cell value in the udf, but no it does not call the URL (visits tracking on the URL says it has not been called).
Function callurl(urltocall As String) As String
Dim urlText As String
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", urltocall, False
.send
urlText = .responseText
End With
End Function
I do not need it to return any data, just to call the URL to run the script. The point of doing this is to take variables from excel and use them as parameters in the URL which will run a script and update a web SQL database.
The actual result was nothing (blank cell in excel, no visit to webpage).