title: VB.NET CreateObject dll ambiguity
body: <p>could you please help with the following</p>
  
  <p>I try to use Some.dll version 5.0 within my code.
  However, Excel has multiple reference for the same dll, with earlier versions like 4.0
  If I run: </p>
  
  <pre><code>Set co = CreateObject("SomeClass.Object")
  </code></pre>
  
  <p>even if I created a reference in Tools->References for the newest Some.dll, it calls one of the oldest dll, that does not have some functionality.</p>
  
  <p>I do not have admin right to change registry, remove programs from my computer.</p>
  
  <p>Is it possible somehow set reference to the newest version dll?</p>
  
  <p>I tried:</p>
  
  <pre><code>Private Declare Function LoadLibrary Lib "kernel32"...
  lb = LoadLibrary(C:\somepath\Some.dll) ' lb is the 5.0 version dll that should be used
  set co = CreateObject("lb.Object")
  </code></pre>
  
  <p>however, it is not working ("ActiveX... can't create object")</p>
  
  <p>and looked through all the net, but could not find advise, how to create object with a specific dll path.</p>
  
  <p>Please help, thanks: Jim</p>