title: How to get a particular link from a specific class?
body: <p>I'd like to extract this <strong>href</strong> from that particular <strong>class</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;tr class="even"&gt;
      &lt;td&gt;
          &lt;a href="/italy/serie-a-2015-2016/"&gt;Serie A 2015/2016&lt;/a&gt;
      &lt;/td&gt;
  </code></pre>
  
  <p>This is what I wrote:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Sub ExtractHrefClass()
  
      Dim ie As Object
      Dim doc As HTMLDocument
      Dim class As Object
      Dim href As Object
  
      Set ie = CreateObject("InternetExplorer.Application")
      ie.Visible = True
      ie.navigate Range("D8")
      Do
          DoEvents
      Loop Until ie.readyState = READYSTATE_COMPLETE
      Set doc = ie.document
      Set class = doc.getElementsByClassName("even")
      Set href = class.getElementsByTagName("a")
      Range("E8").Value = href
      ie.Quit
  
  End Sub
  </code></pre>
  
  <p>But unfortunately there is a mistake <strong>Object doesn't support this property or method (Error 438)</strong> on the line:</p>
  
  <pre class="lang-vb prettyprint-override"><code>    Set href = class.getElementsByTagName("a")
  </code></pre>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>I modified the code as per @RyszardJędraszyk answer, but no output come out O_o Where am I doing wrong?</p>
  
  <pre class="lang-vb prettyprint-override"><code>Sub ExtractHrefClass()
  
      Dim ie As Object
      Dim doc As HTMLDocument
      Dim href As Object
      Dim htmlEle As Object
  
      Set ie = CreateObject("InternetExplorer.Application")
      ie.Visible = True
      ie.navigate Range("D8")
      Do
          DoEvents
      Loop Until ie.readyState = READYSTATE_COMPLETE And ie.Busy = False
      Set doc = ie.document
      Set href = doc.getElementsByTagName("a")
      For Each htmlEle In href
          If htmlEle.className = "even" Then
              Range("E8").Value = htmlEle
          End If
      Next
      ie.Quit
  
  End Sub
  </code></pre>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>As @dee requested in comment, there is the code from the web page <a href="http://www.soccer24.com/italy/serie-a/archive/" rel="nofollow noreferrer">http://www.soccer24.com/italy/serie-a/archive/</a></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;a href="/italy/serie-a/"&gt;Serie A 2016/2017&lt;/a&gt;
          &lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="even"&gt;
          &lt;td&gt;
              &lt;a href="/italy/serie-a-2015-2016/"&gt;Serie A 2015/2016&lt;/a&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;span class="team-logo" style="background-image: url(/res/image/data/UZbZIMhM-bsGsveSt.png)"&gt;&lt;/span&gt;&lt;a href="/team/juventus/C06aJvIB/"&gt;Juventus&lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;a href="/italy/serie-a-2014-2015/"&gt;Serie A 2014/2015&lt;/a&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;span class="team-logo" style="background-image: url(/res/image/data/UZbZIMhM-bsGsveSt.png)"&gt;&lt;/span&gt;&lt;a href="/team/juventus/C06aJvIB/"&gt;Juventus&lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>
  
  <p>I need only to extract that line: <code>/italy/serie-a-2015-2016/</code></p>