title: Navigate to new URL in existing Internet Explorer window
body: <p>I am trying to get an existing (open) IE window to load a new URL via <code>ie.Navigate</code>.</p>
  
  <p>Below is my worksheet code which loads a website on click of a button:</p>
  
  <pre><code>Private Sub Sendit_Click()
      Dim IE As Object
  
      Set IE = CreateObject("InternetExplorer.Application")
      IE.Visible = True
      IE.navigate "https://www.yahoo.com"
      Do
      Loop Until IE.ReadyState = READYSTATE_COMPLETE
  
      GetIE
  
      Err_Clear:
      If Err &lt;&gt; 0 Then
          Err.Clear
          Resume Next
      End If
  End Sub
  </code></pre>
  
  <p>This code is in my module:</p>
  
  <pre><code>Function GetIE()
      Dim shellWins As ShellWindows
      Dim IE As InternetExplorer
  
      Set shellWins = New ShellWindows
  
      If shellWins.Count &gt; 0 Then
          ' Get IE
          Set IE = shellWins.Item(0)
      Else
          ' Create IE
          Set IE = New InternetExplorer
          IE.Visible = True
      End If
  
      IE.navigate "http://www.google.com"
  
      Set shellWins = Nothing
      Set IE = Nothing
  End Function
  </code></pre>
  
  <p>IE doesn't navigate to <a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a>.</p>