title: Using excel vba to change the value of a dropdown menu on a website
body: <p>I am writing an Excel macro to fill out a form on a website. I have written the code that populate the text boxes easily enough, and found code to chose radio boxes, but I am having problems with choosing info from dropdown menus. </p>
  
  <blockquote>
    <p><strong>Example 'Gender':</strong></p>
    
    <p>The combo box has three options: </p>
  
  <pre><code>Select / Male / Female
  </code></pre>
    
    <p>I've tried a few variations on this: </p>
  
  <pre><code>doc.getElementsByName("xs_r_gender").Item(0).Value="Male"
  </code></pre>
    
    <p>...but with no luck.</p>
  </blockquote>
  
  <p>This is the web source code:</p>
  
  <pre><code>&lt;td&gt; &lt;select name="xs_r_gender" id="xs_r_gender"&gt;
  &lt;option value="" selected&gt;Select&lt;/option&gt;
  &lt;option value="male"&gt;Male&lt;/option&gt;
  &lt;option value="female"&gt;Female&lt;/option&gt; &lt;/select&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Thanks.</p>