title: Scraping tr class information using Excel VBA
body: <p>I've created a simple program in Excel VBA to scrape all the information in a table from <a href="https://www.nasdaq.com/market-activity/stocks/aapl/financials" rel="nofollow noreferrer">https://www.nasdaq.com/market-activity/stocks/aapl/financials</a>. I've used similar code for other websites but for some reason I can't get this one working. Can anyone point what I'm missing? Any help would be much appreciated.</p>
  
  <p>"EDITED CODE"</p>
  
  <pre><code>Public Sub GetCompanyFinancials()
  
  Dim XMLPage As New MSXML2.XMLHTTP60
  Dim HTMLDoc As New MSHTML.HTMLDocument
  Dim HTMLTables As MSHTML.IHTMLElementCollection
  Dim HTMLTable, HTMLRow, HTMLCell As MSHTML.IHTMLElement
  
  XMLPage.Open "GET", "https://www.nasdaq.com/market-activity/stocks/aapl/financials", False
  XMLPage.send
  
  HTMLDoc.body.innerHTML = XMLPage.responseText
  
  Set HTMLTables = HTMLDoc.getElementsByTagName("table")
  
  For Each HTMLTable In HTMLTables
      For Each HTMLRow In HTMLTable.getElementsByTagName("tr")
          For Each HTMLCell In HTMLRow.Children
              Debug.Print HTMLCell.innerText
          Next HTMLCell
      Next HTMLRow
  Next HTMLTable
  
  End Sub
  </code></pre>