title: How can I grab URLs contained in webpages?
body: <p>I'm trying to get URLs from within an external webpage using a macro. Here's my current code:</p>
  
  <pre><code>Sub GoToWebSite()
  
  Dim IE As Object
  
  Application.ScreenUpdating = False
  
  Set IE = CreateObject("InternetExplorer.Application")
  
  With IE
  
      .Navigate "www.website.com/careers/"
  
      .Visible = True
  End With
  
  Application.ScreenUpdating = True 
  Set IE = Nothing
  
  End Sub
  </code></pre>
  
  <p>From here, I want to supply the macro with a particular URL, tell it to search for particular text within www.website.com/careers/, then tell it to grab the hyperlink corresponding to the text, and paste the hyperlink in a cell in a spreadsheet. So for example, search for "Sales" then paste the URL corresponding to "Sales" in a particular cell.</p>