From: Brian Murphy on
Hello All,

From VBA I would like send a value to my web site, and have it return
a value. I've learned how to use FollowHyperlink to send a value to
an ASP script, but how can the ASP script send a value back to VBA??

Thanks,

Brian
Austin, TX
From: Tim Williams on
You can use xmlhttp to make a request to your web page:

'*********************************************************
Sub Tester()
MsgBox WebResponse("http://www.mydomain.com/myactualpage.asp?
info=blah")
End Sub

Private Function WebResponse(sURL As String) As String

Dim XmlHttpRequest As Object
Set XmlHttpRequest = CreateObject("MSXML2.XMLHTTP")
XmlHttpRequest.Open "GET", sURL, False
XmlHttpRequest.send
WebResponse = XmlHttpRequest.responseText

End Function
'***********************************************

Your ASP page just does something like:

'***************************
dim info
info = request.querystring("info")
response.write "You said '" & info & "'"
response.end
'***************************




On May 16, 11:02 pm, Brian Murphy <bmur...(a)xlrotor.com> wrote:
> Hello All,
>
> From VBA I would like send a value to my web site, and have it return
> a value.  I've learned how to use FollowHyperlink to send a value to
> an ASP script, but how can the ASP script send a value back to VBA??
>
> Thanks,
>
> Brian
> Austin, TX

From: Brian Murphy on
Wow! That's almost too easy.
It's exactly what I was looking for.
Thanks bunches, Tim.

On May 17, 3:29 pm, Tim Williams <timjwilli...(a)gmail.com> wrote:
> You can use xmlhttp to make a request to your web page:
>
> '*********************************************************
> Sub Tester()
>     MsgBox WebResponse("http://www.mydomain.com/myactualpage.asp?
> info=blah")
> End Sub
>
> Private Function WebResponse(sURL As String) As String
>
>     Dim XmlHttpRequest As Object
>     Set XmlHttpRequest = CreateObject("MSXML2.XMLHTTP")
>     XmlHttpRequest.Open "GET", sURL, False
>     XmlHttpRequest.send
>     WebResponse = XmlHttpRequest.responseText
>
> End Function
> '***********************************************
>
> Your ASP page just does something like:
>
> '***************************
> dim info
> info = request.querystring("info")
> response.write "You said '" & info & "'"
> response.end
> '***************************
>
> On May 16, 11:02 pm, Brian Murphy <bmur...(a)xlrotor.com> wrote:
>
> > Hello All,
>
> > From VBA I would like send a value to my web site, and have it return
> > a value.  I've learned how to use FollowHyperlink to send a value to
> > an ASP script, but how can the ASP script send a value back to VBA??
>
> > Thanks,
>
> > Brian
> > Austin, TX