title: How to get a particular link from a web page's source code?
body: <p>i need a macro in VBA that is able to extract all HTML source code from an url contained in a EXCEL cell and put it line by line in all different Excel cells.
  I've previously searched different solutions on the net but not finding the right one.</p>
  
  <p>Thanks for helping ;)</p>
  
  <p><strong>EDIT:</strong>
  thanks to the libraries just insert i could also test another macro that i've previously found on the net:</p>
  
  <pre><code>Sub Naviga()
  Dim texto As String
  Dim objIE As Object
  Dim DestUrl As String
  
  DestUrl = "http://www.google.it"
  
      Set objIE = CreateObject("InternetExplorer.Application")
      objIE.Visible = False
      objIE.Navigate2 DestUrl
  
  Do
  DoEvents
  Loop Until objIE.ReadyState = READYSTATE_COMPLETE
  
  Range("A" &amp; 1).Value = objIE.document.body.innerHTML
  
  End Sub
  </code></pre>
  
  <p>and it's works, but unfortunately i would like that the link was acquired directly from a cell in excel, and when the line is copied, the next line, start with the next cell, the cell below.
  How can i modify the macro?</p>
  
  <p><strong>EDIT 2:</strong>
  The solution is near, i've just fixed the code, now is more clean:</p>
  
  <pre><code>Sub EstrSorgPag()
  Dim IE As Object
  
      Set IE = CreateObject("InternetExplorer.Application")
      IE.Visible = False
      IE.navigate Range("H1")
  
  Do
  DoEvents
  Loop Until IE.readyState = READYSTATE_COMPLETE
  
  Range("A" &amp; 1).Value = IE.document.body.innerHTML
  
  End Sub
  </code></pre>
  
  <p>but lacks the last part where the macro should copy the content cell by cell (A1,A2,A3,A4... and so on)</p>
  
  <p><strong>EDIT 3:</strong>
  Hello guys, i wrote this short code that extract all links from a web page's source code:</p>
  
  <pre><code>Sub EstraiURLdaWeb()
  
  Dim doc As HTMLDocument
  Dim output As Object
  
  
  Set IE = New InternetExplorer
  IE.Visible = False
  IE.navigate Range("L1")
  
  Do
      DoEvents
      Loop Until IE.readyState = READYSTATE_COMPLETE
  
  Set doc = IE.document
  Set output = doc.getElementsByTagName("a")
  
  i = 5
  For Each link In output
      Range("A" &amp; i).Value = link
      i = i + 1
  
  Next
  
  MsgBox "Fatto!"
  
  End Sub
  </code></pre>
  
  <p>But i would need to extract this in particular:</p>
  
  <pre><code>&lt;li class="bubble"&gt;&lt;span&gt;&lt;a href="/soccer/finland/veikkausliiga/standings/YTtR3YWr/"&gt;Main&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
  </code></pre>
  
  <p>how can I do?</p>