title: Automation error: The object invoked has disconnected from its clients
body: <p>All I did was copy-paste a piece of code that worked perfectly fine in a different sub into my new sub and change the URL I wanted to navigate. The first sub still works, but the second one doesn't. I'm pretty stumped.</p>
  
  <pre><code>Dim ie As InternetExplorer              
  Dim html As HTMLDocument                 
  Set ie = New InternetExplorer            
  ie.Visible = False                       
  ie.navigate "http://cesp.hma.eu/Contacts" 
  With ie                                  
      Do Until .READYSTATE = 4: DoEvents: Loop
      Do While .Busy: DoEvents: Loop
  End With
  Set html = ie.document             
  Set ie = Nothing                   
  Application.StatusBar = ""  
  </code></pre>
  
  <p>Using F8 to check the code step by step, it seems that the URL ignores the <code>ie.Visible = False</code> (it opens when I reach <code>With ie</code>), then makes the error pop up on <code>Do While .Busy: DoEvents: Loop</code></p>
  
  <p>I honestly don't know where to start looking to fix this, since I <em>literally</em> only changed the URL and nothing else. My best bet was to just close my workbook and re-open it, but the issue decided to persist. Any hints, explanations, or solutions you can come up with would be greatly appreciated.</p>