title: Excel VBA Web Scraping not referencing created internet explorer object
body: <p>I am trying to get some data from a website that requires inputting into forms. The code below is opening a new internet explorer window but then when it gets to the pointed out line Run-time error 462 comes up saying the remote server does not exist or is unavailable. Is the new window not being assigned to the ie object?</p>
  
  <pre><code>Sub Code()
      Dim ie As Object
      Dim ht As HTMLDocument
      Dim result As String
  
  
  
      'Browser Initialization
      Set ie = CreateObject("InternetExplorer.Application")
      ie.Visible = True
      ie.navigate "url"
  
  ---&gt;Do While ie.Busy Or ie.readyState &lt;&gt; 4
          Application.Wait Now + TimeValue("00:00:01")
      Loop
  
      Set ht = ie.document
      ie.Quit
  End Sub
  </code></pre>
  
  <p>It gives the same error at the set ht = ie.document line as well if I get rid if the loop.I am running on  Windows 10, is that the issue?</p>