title: Populate excel user form combo-box from html combo-box with vba
body: <p>I have a user form that I would like the html option values to populate the excel combo box. Basically I want to duplicate the values and pass them later.</p>
  
  <p>What I have is smashed together from various posts but nothing seems to work. </p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim appIE As InternetExplorerMedium
  Dim nam As Object
  Dim sel As Object
  
  Set appIE = New InternetExplorerMedium
  sURL = "site infor goes here"
  With appIE
      .navigate sURL
      .Visible = True
  End With
  Do While appIE.Busy Or appIE.readyState &lt;&gt; 4
      DoEvents
  Loop
  For Each f In IE.document.getElementsByTagName("select")
      If f = "suppliercode" Then
          For Each fOption In IE.document.getElementsByTagName("option")
              With Me.SupplierSite.AddItem(f.Option)
              End With
          Next fOption
      End If
  Next f
  
  ALSO TRIED:
  Set Doc = IE.document.forms("NewReleaseQueueForm1")
  For Each sel In Doc.getElementsByTagName("select")(0).Value
  If sel.Name = "suppliercode" Then
  'loop through and add each option to Me.SupplierSite
  For Each opt In IE.document.forms("NewReleaseQueueForm1").getElementsByTagName("option")(0).Value
  Me.SupplierSite.AddItem sel.Value
  Next opt
  End If
  Next sel
  </code></pre>
  
  <p>HTML Sample:</p>
  
  <pre class="lang-htm prettyprint-override"><code>&lt;form id="NewReleaseQueueForm1" method="post" name="NewReleaseQueueForm1"&gt;
      &lt;table cellpadding="4"&gt;
          &lt;tr&gt;
              &lt;th valign="top"&gt;Supplier Site&lt;/th&gt;
              &lt;td valign="top"&gt;
                  &lt;select multiple name="suppliercode" size="5"&gt;
                      &lt;option selected value="Any"&gt;
                          &amp;lt;Any&amp;gt;
                      &lt;/option&gt;
                      &lt;option value="T488C"&gt;
                          T488C
                      &lt;/option&gt;
                  &lt;/select&gt;
              &lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
  </code></pre>