title: pulling href after getting elements
body: <p>Hopefully a really easy easy question but this is something I always seem to run into issues when web scraping.</p>
  <p>I'm webscraping from a database containing many chemical dossiers, some of which have a separate section for toxicological information and some do not. In this example the url provided is fixed as I know this does contain a link to the toxicological info and so will pull the &quot;Sub&quot; url from.</p>
  <p>I wish to check if the website has this info by pulling this ur, and if not running conditional code to give a message saying no tox info etc..</p>
  <p>Inspecting the page:</p>
  <p><code>&lt;li id=&quot;SubNav7_1&quot; class=&quot;active&quot;&gt; &lt;a href=&quot;/registration-dossier/-/registered-dossier/15460/7/1&quot;&gt; Toxicological Summary&lt;/a&gt; &lt;/li&gt;</code></p>
  <p>I have navigated correctly to SubNav7 but I run into a runtime error 13 when trying to get the url.</p>
  <pre><code>Public Sub GetContents()
      
  'Start ECHA Search via XML HTTP Request
      
      Dim XMLReq As New MSXML2.XMLHTTP60
      Dim HTMLDoc As New MSHTML.HTMLDocument
      
      XMLReq.Open &quot;Get&quot;, &quot;https://echa.europa.eu/registration-dossier/-/registered-dossier/15460&quot;, False
      XMLReq.send
       
      HTMLDoc.body.innerHTML = XMLReq.responseText
      
  'GetLink
      
      Set link = HTMLDoc.getElementById(&quot;SubNav7_1&quot;).getAttribute(&quot;href&quot;)
      
      Debug.Print link
  
  
  End Sub
  </code></pre>
  <p>The expected output is <code>https://echa.europa.eu/registration-dossier/-/registered-dossier/15460/7/1</code></p>
  <p>If anyone could point how I can essentially get to the a tag attribute under SubNav7_1 that'd be great</p>