title: VBA - Scrape HTML table without id
body: <p>I am trying to get data from a html table with VBA. After selecting a value from a list box, filling a text box and clicking a button the table appears. But the url of the website does not change.</p>
  
  <p>My program does fill the box, select the list box value and click the "search" button, but then I can't get the data from the table.</p>
  
  <p>I need the values of the table's cells at the end of the page. (second &lt; t d >)</p>
  
  <p>Here's the <a href="http://www.cmfchile.cl/institucional/mercados/entidad.php?auth=&amp;send=&amp;mercado=V&amp;rut=9278&amp;grupo=&amp;tipoentidad=FINRE&amp;vig=VI&amp;row=AAAw%20cAAhAABP4MAAz&amp;control=svs&amp;pestania=27" rel="nofollow noreferrer">url</a> of the page: </p>
  
  <h2>Code:</h2>
  
  <pre><code>Sub Info()
  
  Dim enlace As String
  Dim id As String
  Dim lista
  Dim rut As Integer
  Dim i As Integer
  Dim largo As Integer
  
  largo = Worksheets("Lista").Cells(rows.Count, 1).End(xlUp).Row
  
  id = Worksheets("Lista").Cells(2, 1).Value
  lista = Split(id, "-")
  rut = lista(0)
  enlace = "http://www.cmfchile.cl/institucional/mercados/entidad.php?auth=&amp;send=&amp;mercado=V&amp;rut=" &amp; rut &amp; "&amp;grupo=&amp;tipoentidad=FINRE&amp;vig=VI&amp;row=AAAw+cAAhAABP4MAAz&amp;control=svs&amp;pestania=1"
  
  Set objIE = CreateObject("InternetExplorer.application")
  objIE.Visible = False
  objIE.Navigate (enlace)
  Do
      If objIE.ReadyState = 4 Then
          objIE.Visible = False
          Exit Do
      Else
          DoEvents
          End If
  Loop
  
  Dim button_name As String
  button_name = "Aportantes"
  
  Set link = objIE.document.getElementsByTagName("A")
  For Each Hyperlink In link
  If InStr(Hyperlink.innerText, button_name) &gt; 0 Then
      Hyperlink.Click
  Exit For
  End If
  Next
  
  Dim nuevoLink As String
  nuevoLink = Hyperlink
  
  objIE.Quit
  
  Set ie = CreateObject("InternetExplorer.application")
  ie.Visible = False
  ie.Navigate (nuevoLink)
  Do
      If ie.ReadyState = 4 Then
          ie.Visible = False
          Exit Do
      Else
          DoEvents
          End If
  Loop
  
  Dim sem As String
  Dim ano As Integer
  sem = "03"
  ano = 2018
  
  Dim aportantes As Object
  Dim cuotas_emitidas As Object
  
  ie.document.getElementById("semestre").Value = sem
  ie.document.getElementById("aa").Value = ano
  Set elems = ie.document.getElementsByTagName("input")
  For Each e In elems
  If (e.getAttribute("value") = "Consultar") Then
      e.Click
      ''HERE IS THE PROBLEM
      Set aportantes = ie.document.getElementsByTagName("table")(1).getElementsByTagName("tr")(0).getElementsByTagName("tr")(1)
      ThisWorkbook.Worksheets("Lista").Cells(i, 4).Value = aportantes
      Set cuotas_emitidas = ie.document.getElementsByTagName("table")(1).getElementsByTagName("tr")(1).getElementsByTagName("tr")(1).innerText
      ThisWorkbook.Worksheets("Lista").Cells(i, 5).Value = cuotas_emitidas
  End If
  Next e
  End Sub
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;table&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
      &lt;td class="fondoOscuro"&gt;2.01.60 TOTAL APORTANTES&lt;/td&gt;
      &lt;td&gt;58&lt;/td&gt;
    &lt;/tr&gt;
  
    &lt;tr&gt;
      &lt;td class="fondoOscuro"&gt;2.01.70 CUOTAS EMITIDAS&lt;/td&gt;
      &lt;td&gt;20000000 &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="fondoOscuro"&gt;2.01.71 CUOTAS PAGADAS&lt;/td&gt;
      &lt;td&gt;7691000&lt;/td&gt;
  
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="fondoOscuro"&gt;2.01.72 CUOTAS SUSCRITAS Y NO PAGADAS&lt;/td&gt;
      &lt;td&gt;0 &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="fondoOscuro"&gt;2.01.73 NUMERO DE CUOTAS CON PROMESA DE SUSCRIPCION Y PAGO&lt;/td&gt;
      &lt;td&gt;0  &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="fondoOscuro"&gt;2.01.74 NUMERO DE CONTRATOS DE PROMESAS DE SUSCRIPCION Y PAGO&lt;/td&gt;
      &lt;td&gt;0&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="fondoOscuro"&gt;2.01.75 NUMERO DE PROMITENTES SUSCRIPTORES DE CUOTAS&lt;/td&gt;
      &lt;td&gt;0 &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class="fondoOscuro"&gt;2.01.80 VALOR LIBRO DE LA CUOTA&lt;/td&gt;
      &lt;td&gt;1.0059 &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;
  </code></pre>
  
  <p>'</p>