Consulting

Results 1 to 2 of 2

Thread: Get browser to update after changing drop down box value

  1. #1
    VBAX Regular
    Joined
    Apr 2012
    Posts
    22
    Location

    Get browser to update after changing drop down box value

    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

  2. #2
    Add FireEvent("onchange") line or Submit button .Click

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •