title: VBA : access an HTML elements without Id or Name
body: <p>In VBA I wondered if this possible to click on this HTML button without Id and Name attribute :</p>
  
  <pre><code>&lt;ul aria-hidden="false" role="menu"&gt;
     &lt;li&gt;
          &lt;button ..&gt;&lt;/button&gt;
     &lt;/li&gt;
     &lt;li&gt;
          &lt;button ..&gt;&lt;/button&gt;
     &lt;/li&gt;
     &lt;li&gt; &lt;!-- THE THIRD li, I would like to access this button --&gt;
          &lt;button title="exporter" role="menuitem" data-ng-disabled="myfunction()"&gt;my text&lt;/button&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>For other elements with Id or a Name, here is how I do :</p>
  
  <pre><code>Set IE = CreateObject("InternetExplorer.Application")
  IE.navigate "site.com"
  IE.document.getElementById("submitBtn").Click
  // IE.document.getElementByName("submitBtn").Click
  </code></pre>
  
  <p>but in my previous example there is no "Id" or "Name" available, only a Title attribute for the button, is there any possibility to access this button ?</p>
  
  <p>Any idea ?</p>
  
  <hr>
  
  <p>Another way I tried but also not working :</p>
  
  <p>the goal is to click the button, so I tried to execute directly "myfunction()", like this :</p>
  
  <pre><code>IE.document.parentWindow.execScript "myfunction()", "Javascript"
  </code></pre>
  
  <p>btu I get an execution error (error 80020101).. any idea ?</p>