title: VBA Automate IE: element.click and element.FireEvent (OnClick) Not working
body: <p>I am trying to parse a web based pivot table. 
  Unfortunately, I need to expand additional lines in the web based pivot table in order to access all the data I need. I think that when I click on the + sign to expand additional lines, a script downloads the additional data from the database.</p>
  
  <p>Anyway, here is the html code of the + sign:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;DIV class="clip9x9 di-img" onclick=_Ewa.Gim.tpdfce(event);&gt;
      &lt;INPUT title=Expand class=ewaboot_expand type=image alt=Expand src="http://..."&gt;
  &lt;/DIV&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I manage to get the correct element into an variable using <code>IE.document.getElementsByTagName("Div")</code> and a If Loop (for some reason the <code>GetElementByClassName</code> would crash my IE), but none of the <code>.Click</code> or <code>.FireEvent (OnClick)</code> methods works. I also tried both methods on the Input element below the <code>DIV</code>, and these are not working either. 
  Here is the code</p>
  
  <pre><code>Sub Test()
      Dim IE As InternetExplorer
      Dim div As Variant
      Dim Obj As Variant
      Dim WebUrl As String
  
      WebUrl = "http://..../filename.aspx"
      Set IE = New InternetExplorerMedium
      Sleep 1000
      IE.Visible = True
      IE.navigate WebUrl
      Do While IE.Busy Or IE.readyState &lt;&gt; READYSTATE_COMPLETE
          Sleep 1000
      Loop
  
      Set div = IE.document.getElementsByTagName("Div")
  
      For Each Obj In div
          If Obj.className = "clip9x9 di-img" Then
              Obj.Click
              Obj.FireEvent ("OnClick")
          End If
      Next i
  End Sub
  </code></pre>
  
  <p>When I look at the onclick attribute of my Obj element in th Spy Window (VBA editor), the onclick property has a + sign aside, and when inspecting inside it, no variable is attributed to it. I find it weird since the HTML code indicates a <code>value =”_Ewa.Gim.tpdfce(event);”</code> which I believe refers to the script that expands the pivot table line.</p>
  
  <p>Any help would be much appreciated </p>