PDA

View Full Version : Get browser to update after changing drop down box value



b.hill
12-01-2014, 07:16 PM
I am trying to get the site to update after inputting the drop down box value for "ALL" instead of "25". I can change the value, but the site won't update like it will by changing the drop down box with the mouse. I have searched potential solutions such as Focus and FireEvent and have not been able to find anything that will work. Thank you in advance.

Code:

Sub Testing()


Dim oHTML_Element As IHTMLElement
Dim sURL As String
Dim oHTMLLinkElement As HTMLLinkElement


On Error Resume Next


sURL = "https://rotogrinders.com/game-stats?sport=nba&site=fanduel&range=season"


Set oBrowser = New InternetExplorer
oBrowser.Silent = True
oBrowser.navigate sURL
oBrowser.Visible = True


Do
Loop Until oBrowser.readyState = READYSTATE_COMPLETE
Do While oBrowser.Busy: DoEvents: Loop


Set HTMLDoc = oBrowser.document


HTMLDoc.all.Item("proj-stats_length")(1).selectedIndex = 3

End Sub

junior_88
12-08-2014, 02:14 AM
Add FireEvent("onchange") line or Submit button .Click