title: Can't get specific data-point to pull from Yahoo Finance into Excel?
body: <p>I am trying to pull a very specific number from the Yahoo Finance page but am getting stuck. The link where I am trying to pull this information from is:</p>
  
  <blockquote>
    <p><a href="http://finance.yahoo.com/q/hp?s=AAPL+Historical+Prices" rel="nofollow">http://finance.yahoo.com/q/hp?s=AAPL+Historical+Prices</a></p>
  </blockquote>
  
  <p>I am interested in getting the <strong>111.31</strong> number that is listed near the top of that page in bold. I have written the following code to extract this information but every time I run it, it says "Object doesn't support this property or method". I suspect the error lies in the line where I use <code>getElementsByClass</code> and <code>getElementsById</code> to extract that data.</p>
  
  <pre><code>    Sub GetQuote()
      Dim IE As Object
  
       Set IE = CreateObject("InternetExplorer.Application")
  
       With IE
          .Visible = True
          .navigate "http://finance.yahoo.com/q/hp?s=AAPL+Historical+Prices"
          Do While .busy: DoEvents: Loop
          Do While .ReadyState &lt;&gt; 4: DoEvents: Loop
          With .document
              Application.Wait (Now + #12:00:05 AM#)
              Sheets("Sheet1").Range("A3") = .getElementsByClass("time_rtq_ticker").getElementsById("yfs_184_aapl").innerText
  
          End With
  
      End With
  
      Set IE = Nothing
      End Sub
  </code></pre>
  
  <p>Can you all please take a look and let me know where I went wrong and how I can fix this? </p>