title: What are the differences between using the New keyword and calling CreateObject in Excel VBA?
body: <p>What criteria should I use to decide whether I write VBA code like this:</p>
  
  <pre><code>Set xmlDocument = New MSXML2.DOMDocument
  </code></pre>
  
  <p>or like this:</p>
  
  <pre><code>Set xmlDocument = CreateObject("MSXML2.DOMDocument")
  </code></pre>
  
  <p>?</p>