Using Excel VBA to click through hover dropdown menus
<p>How do we select dropdown option using VBA?</p>

<p>For example, my HTML source code looks like below, and I try to select second one, "코스피200 선물".</p>

<pre><code>&lt;select name="isu_cd" id="isu_cdc74d97b01eae257e44aa9d5bade97baf"&gt;
    &lt;option value="ALL"&gt;전체&lt;/option&gt;
    &lt;option value="KRDRVFUK2I"&gt;코스피200 선물&lt;/option&gt;
    ....
&lt;/select&gt;
</code></pre>

<p>Therefore, I try to iterate them using "For Each" after selecting that has name="isu_cd".</p>

<p>But the test for "MsgBox (botton.innnerHTML)" in the "For Each" gives me full of HTML code includes every other options as unexpected.</p>

<p><a href="https://i.stack.imgur.com/bOCO4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bOCO4.png" alt="Unexpected Results"></a></p>

<p>Could we iterate this with my approach?</p>

<pre><code>Sub test_javascript()

    url = "http://marketdata.krx.co.kr/mdi#document=060101"

    Set ie = CreateObject("InternetExplorer.Application")
        ie.Visible = True
        ie.navigate url

    Do Until (ie.readyState = 4 And Not ie.Busy)
        DoEvents
    Loop

    Application.Wait (Now + TimeValue("00:00:10"))

    Set Buttons = ie.document.getElementsByName("isu_cd")

    For Each botton In Buttons

        MsgBox (botton.innerHTML) 'it gives all of HTML code unexpectedly

        If botton.innerHTML = "코스피200 선물" Then 'Nothing comes to here
            MsgBox (botton.innerHTML)
            botton.FireEvent ("onchange")
            Exit For
        End If
    Next

End Sub
</code></pre>