Hi
May I ask for some advice on how to get combobox value change to fire via VBA, please see my code below and the line that is not working I written comment next to.
Much appreciated
Sub WebScrape()
Dim MyURL As String
Application.Calculation = xlManual
Worksheets(2).Activate
MyURL = "http://www.hl.co.uk/funds/fund-discounts,-prices--and--factsheets/search-results?page=1&tab=prices"
Set ie = New InternetExplorer
ie.Silent = True
ie.navigate MyURL
ie.Visible = True
Do
Loop Until ie.readyState = READYSTATE_COMPLETE
Set incl = ie.document.getElementById("f_class_inclusive")
incl.Checked = True
For i = 0 To ie.document.getElementsByTagName("optgroup")(1).Children.Length - 1
ie.document.getElementById("search-company").Value = ie.document.getElementsByTagName("optgroup")(1).Children(i).Value
ie.document.getElementById("search-company").FireEvent ("onchange") ' This line is not working
Next
Bookmarks