Public Function Navigate(sURL As String, sPostData As String) As String
Dim HttpReq As MSXML2.XMLHTTP, Errcount
Set HttpReq = New MSXML2.XMLHTTP
On Error Resume Next
' HttpReq.Open "POST", sURL, True' toggle the use of these lines if did not work
HttpReq.Open "GET", sURL, True
DoEvents
HttpReq.send sPostData
Do1:
DoEvents
Navigate = HttpReq.responseText
DoEvents
If HttpReq.readyState = 4 Then
Navigate = HttpReq.responseText
DoEvents
Else
DoEvents
GoTo Do1
End If
GoTo ByeBye
Err11:
'Errcount = Errcount + 1
'If Errcount > 10 Then GoTo ByeBye
'Set HttpReq = Nothing
'DoEvents
'Err.Clear
'ReadSStatus
GoTo ByeBye
ByeBye:
Set HttpReq = Nothing
End Function
Dim HttpReq As MSXML2.XMLHTTP, Errcount
Set HttpReq = New MSXML2.XMLHTTP
On Error Resume Next
' HttpReq.Open "POST", sURL, True' toggle the use of these lines if did not work
HttpReq.Open "GET", sURL, True
DoEvents
HttpReq.send sPostData
Do1:
DoEvents
Navigate = HttpReq.responseText
DoEvents
If HttpReq.readyState = 4 Then
Navigate = HttpReq.responseText
DoEvents
Else
DoEvents
GoTo Do1
End If
GoTo ByeBye
Err11:
'Errcount = Errcount + 1
'If Errcount > 10 Then GoTo ByeBye
'Set HttpReq = Nothing
'DoEvents
'Err.Clear
'ReadSStatus
GoTo ByeBye
ByeBye:
Set HttpReq = Nothing
End Function
sURL, sPostData
Views 7,140
Downloads 1,641
CodeID
DB ID
ANmarAmdeen
609
Revisions
v2.0
Thursday
September
27
2018