How Do I select from DropDown Menu that Does not have an ID
<p>My Code:</p>

<pre><code>Const navOpenInNewTab = &amp;H800
      Set IE = CreateObject("InternetExplorer.Application")
      IE.Visible = True
................
IE.Navigate "https://www./CTMT"


      Do While IE.Busy Or IE.ReadyState &lt;&gt; 4: Loop

      Application.Wait (Now + TimeValue("00:0:03"))

      Set HTMLDoc2 = IE.document
      HTMLDoc2.getElementsByName("merchID")(0).Value = "aa"
      HTMLDoc2.getElementByName("selDate")(0).SelectedIndex = 2

      'HTMLDoc2.getElementByName("selDate")(0).FireEvent ("onchange")
      'HTMLDoc2.getElementsByName("Search")(0).Submit

      HTMLDoc2.Forms("onlineReportFormBean").Submit

      Do While IE.Busy Or IE.ReadyState &lt;&gt; 4: Loop

    End Sub
</code></pre>

<p>Q) I am able to fill the text box next to Merchant ID but I am Unable to select the second Index...May2016 using the above code.</p>

<pre><code>HTMLDoc2.getElementByName("selDate")(0).SelectedIndex = 2
</code></pre>

<p>Above line gives the error : Object doesnt support this property or method</p>

<p>Q2) I am also unable to click on "search".</p>

<pre><code>HTMLDoc2.Forms("onlineReportFormBean").Submit
</code></pre>

<p>Line gives automation error..</p>