title: Methods of object IWebBrowser2 fail
body: <p>I'm working on a longer script for Access and at one point it is necessary to check a webservice for the latest version of a file (the filename). This webservice is only accessible via a browser where it is necessary to athenticate. I already managed to open an Internet Explorer window (which is visible although it shouldn't). However after that I get the error </p>
  
  <blockquote>
    <p>Method 'Busy' of object 'IWebBrowser2' failed</p>
  </blockquote>
  
  <p>Right now I have the following code:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim appIE As Object
  Dim sURL as String, infoStr as String
  Set appIE = GetObject("new:{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}") 'class id of InternetExplorerMedium
  sURL = "https://webservice.example.com:1234/Server/test.jsp?parameter=value"
  With appIE
      .Navigate sURL, Headers:=CreateBasicAuthHeader("MyUsername", "MyPassword")
      .Visible = False
  End With
  
  Do While appIE.Busy Or appIE.ReadyState &lt;&gt; 4
      DoEvents
  Loop
  
  infoStr = appIE.Document.getElementsByTagName("body").item.innerText
  </code></pre>
  
  <p>which works well until the line:</p>
  
  <pre><code>Do While appIE.Busy Or appIE.ReadyState &lt;&gt; 4
  </code></pre>
  
  <p>If I'd leave the loop out the same error would appear but for 'Document' instead of 'Busy' in line <code>infoStr = appIE.Document.getElementsByTagName("body").item.innerText</code>. Considering that also <code>.Visible = False</code> has no impact (I can see the browser window) I think that any operation on <code>appIE</code> after <code>.Navigate</code> isn't working. But I have no idea why.</p>
  
  <p>After searching a while after the mentioned error I found 3 possible solutions but neither of them succeed. </p>
  
  <ol>
  <li>Using the <code>.Busy</code> or <code>.ReadyState</code> properties to prevent the macro from proceeding while the browser hasn't completely loaded the site. Which I obviously already do.</li>
  <li>Using internet explorer at a medium integrity level. Which I also already do.</li>
  <li>Searching the Task Manager for any "orphaned" IE processes. There are none.</li>
  </ol>
  
  <p>Any help or idea is greatly appreciated.</p>