Hi,
I am trying to execute some code that will open a website, submit a form and retrieve some data from that same website.
So far I have been able to accomplish two of the three things mentioned above, but I seem stuck now.
Basically what my code does so far is: opens IE, waits for it to load, copies a value from a cell to a website form and submits the form.
So far so good, problem is I don't know how to copy the value I want and paste it back to a cell in Excel.
Can anybody help me? 
The website I am testing this on is: "http://www.abc.es/loteria-de-navidad/buscardecimo.asp"
What I would like to do is retrieve the 20 euro value with the red background when the value submitted to the web form is: "11750"
Here's what i got this far:
Sub Macro1()
Dim IE As Object
Dim rng As Range
Dim frm As Object
Set IE = CreateObject("InternetExplorer.Application")
Set rng = Range("A1")
IE.Visible = True
IE.Navigate "http://www.abc.es/loteria-de-navidad/buscardecimo.asp"
Do
DoEvents
Loop Until IE.ReadyState = 4
'fill form
IE.Document.forms("form1").all("numero").Value = rng
'submit form
Set frm = IE.Document.getElementById("form1")
frm.Submit
End Sub
Bookmarks