bklocinski
12-11-2014, 01:51 PM
I have an HTTP line of code that goes to a specified URL and responses back with the requested information. Some of the URLs can only be accessed after logging onto a member site so I need to be able to log into a website with my username and password and then run the HTTP GET. I am not really sure how to incorporate the Http POST into this process. The oriURL is listed in an Excel cell. Any help or suggestions is greatly appreciated.
If ws.Cells(i, 2) <> "" Then
oriURL = Trim(ws.Cells(i, 2).Value)
Application.StatusBar = "Processing Row#" & I
j = 1
resultFound = True
targetSheetCreated = False
Do While resultFound 'And j < 3
resultFound = False
If j <> 1 Then
If (Right(oriURL, 1) = "/") Then
URL = oriURL & CStr(j)
Else
URL = oriURL & "&page=" & CStr(j)
'URL = oriURL & "/" & CStr(j)
End If
Else
URL = oriURL
End If
On Error GoTo InvalidUrl
'Call the URL and Get Requested Info
Http.Open "GET", URL, False
'MsgBox URL
Http.Send
If ws.Cells(i, 2) <> "" Then
oriURL = Trim(ws.Cells(i, 2).Value)
Application.StatusBar = "Processing Row#" & I
j = 1
resultFound = True
targetSheetCreated = False
Do While resultFound 'And j < 3
resultFound = False
If j <> 1 Then
If (Right(oriURL, 1) = "/") Then
URL = oriURL & CStr(j)
Else
URL = oriURL & "&page=" & CStr(j)
'URL = oriURL & "/" & CStr(j)
End If
Else
URL = oriURL
End If
On Error GoTo InvalidUrl
'Call the URL and Get Requested Info
Http.Open "GET", URL, False
'MsgBox URL
Http.Send