title: VBA script fails on intranet
body: <p>I am currently using Office 2010, Visual Basic for Applications 7, and Internet Explorer 9.</p>
  
  <p>The current issue I've been having is that using an IE object seems to fail on our intranet, and I was wondering if there was a fix for this.</p>
  
  <p>Functioning code:</p>
  
  <pre><code>Dim IE As Object
  Set IE = CreateObject("InternetExplorer.Application")
  IE.Navigate "http://www.google.com"
  WaitUntilReady IE
  'Application.Wait (Now + TimeValue("00:00:10"))
  'IE.Visible = True
  MsgBox (IE.Document.body.innerHTML)
  </code></pre>
  
  <p>Broken code:</p>
  
  <pre><code>Dim IE As Object
  Set IE = CreateObject("InternetExplorer.Application")
  IE.Navigate "http://intranet/"
  WaitUntilReady IE
  'Application.Wait (Now + TimeValue("00:00:10"))
  'IE.Visible = True
  MsgBox (IE.Document.body.innerHTML)
  </code></pre>
  
  <p>Functioning code does exactly what it should. Makes an IE object which doesn't show up visibly on screen, and returns a message box with the HTML code contents of google.com</p>
  
  <p>Broken code loads our intranet home page, in a VISIBLE IE window, and returns this error:</p>
  
  <pre><code>Run-time error '-2147417848 (80010108)'
  Automation error
  The object invoked has disconnected from its clients
  </code></pre>
  
  <p>I've read through <a href="https://stackoverflow.com/questions/12965032/excel-vba-controlling-ie-local-intranet">Excel VBA Controlling IE local intranet</a> which suggested using an IP address instead of intranet/ which doesn't work because the IP directs to a different splash screen.</p>
  
  <p>I've also tried using</p>
  
  <pre><code>Set IE = New InternetExplorerMedium
  </code></pre>
  
  <p>But this A- didn't seem to work either, and B- would mean making sure all my fellow employees enable this Reference.</p>
  
  <p>Also, I've tried loading google.com first, then having it navigate to intranet/, which also didn't help.</p>
  
  <p>Anyone have any suggestions? From my understanding, loading intranet/ is causing IE to disconnect from Excel somehow?</p>