title: VBA XMLHTTP clear authentication?
body: <p>I am writing a set of VBA macros in which it uses the XMLHTTP object to send asynchronous requests to a server.  I am sending Basic Authentication with:</p>
  
  <pre><code>XMLHttpReq.setRequestHeader "Authorization","Basic " &amp; Base64EncodedUserPass
  </code></pre>
  
  <p>This works great the first time.
  But if the user changes their userid/password, even if the code creates a brand new XMLHttpReq object and sets this header to the new information, it logs in to the server as the first user, presumably from cached credentials.</p>
  
  <p>How can I cause the code to "forget" that I have logged in before, and re-authorize?</p>
  
  <p><strong>Edit</strong> as requested, the relevant part of the code; it really isn't very complicated:</p>
  
  <pre><code>myURL = "http://my.domain.com/myscript.cgi"
  Dim oHttp As New MSXML2.XMLHTTP
  oHttp.Open "POST", myURL, False
  oHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded'"
  oHttp.setRequestHeader "Authorization","Basic " &amp; Base64EncodedUsernamePassword
  oHttp.send "PostArg1=PostArg1Value"
  Result = oHttp.responseText
  </code></pre>