patriciaxxx
Programmer
I’m trying to login to 'myebay' page and print out the data.
I have tried all combinations of the following code but at best they just print out the login page and at worse I get the error ‘access is denied’
I’m using Access 2003.
Any help would be appreciated.
I have tried all combinations of the following code but at best they just print out the login page and at worse I get the error ‘access is denied’
I’m using Access 2003.
Any help would be appreciated.
Code:
[COLOR=#204A87]'This requires a reference to the Microsoft HTML Object Library
Public Sub MyEbay()
Dim oHtml As HTMLDocument
Dim oElement As Object
With CreateObject("MSXML2.xmlHttp")
'.Open "Post", "[URL unfurl="true"]https://signin.ebay.co.uk/ws/eBayISAPI.dll?SignIn",[/URL] False
.Open "GET", "[URL unfurl="true"]http://my.ebay.co.uk/ws/eBayISAPI.dll?MyEbay&gbh=1",[/URL] False
'.send "userid=123abc&pass=456def"
.send
Do Until .readyState = 4: DoEvents: Loop
If .Status = 200 Then
Set oHtml = New HTMLDocument
oHtml.body.innerHTML = .responseText
Debug.Print oHtml.body.outerText
End If
End With
For Each oElement In oHtml.getElementsByTagName("div")
If oElement.className = "mn" Then
Debug.Print oElement.id
End If
Next oElement
Set oHtml = Nothing
End Sub[/color]