Hi there,
I'm interested in creating a macro for collecting historical results from http://www.bbc.co.uk/sport/football/results
Now when I physically go to the page and select the item from the drop down menu (html is <select id="int-group-drop-down" name="filter">) I want. The 'Update' button becomes activated.
However using the below code, it inputs "The Championship" (which is what I want from id="int-group-drop-down") into the drop down menu but the 'Update' button doesn't become activated.
I use the following code, I've tried 'focus' and 'click' options and even tried jumping back and forth from other drop down menu but can't seem to get the 'Update' button active unless I physically click on "The Championship". I know what the code would be to click on 'Update' once it's active but it's getting it active that I'm struggling with.
Just for a visual aid, when I say 'Update' button becoming active, it should turn green.
I haven't seen a similar case before as usually the 'submit' button can be selected with or without data entry.
Any help would be great, thanks.
Sub Test()
Dim IE As InternetExplorer
Dim doc As HTMLDocument
Dim objdd1 As HTMLSelectElement
Dim objdd As HTMLSelectElement
Dim strURL As String
strURL = "http://www.bbc.co.uk/sport/football/results"
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.Navigate strURL
Do While IE.Busy: DoEvents: Loop
Do While IE.ReadyState <> 4: DoEvents: Loop
Set doc = IE.Document
Set objdd1 = doc.getElementById("uk-group-drop-down")
doc.getElementById("filter")(0).Focus
objdd1.Value = "competition-118996115"
' Set objdd = doc.getElementById("uk-group-drop-down")
' doc.GetElementsByTagName("uk-group-drop-down")(0).Focus
' objdd.Value = "competition-118996115"
' IE.Quit
End Sub
Bookmarks