This is the code that I have tried so far:
Sub Macro3()
Dim URL As String
Dim IE As InternetExplorer
Dim HTMLdoc As HTMLDocument
Dim col As IHTMLElementCollection
Dim sel As HTMLSelectElement
Dim r As Long
URL = "http://www.sportinglife.com/racing/results"
Set IE = New InternetExplorer
With IE
.navigate URL
.Visible = True
While .Busy Or .readyState <> READYSTATE_COMPLETE: DoEvents: Wend
Set HTMLdoc = .document
End With
Set col = HTMLdoc.getElementsByTagName("option")
Sheet1.Cells.ClearContents
r = 0
For Each sel In col
Sheet1.Range("A1").Offset(r, 0).Value = sel.getattributes("value")
r = r + 1
Next
End Sub
Bookmarks