title: Create a new object using the text name of the class
body: <p>Is there a way to set an object to the new instance of a class by using the text name of the class?</p>
  
  <p>I will have a library of classes, and depending on some other variable, I want to get one of these classes at runtime.</p>
  
  <p>E.g. I have "CTest1", "CTest2", "CTest3"</p>
  
  <p>I would have function similar to the below</p>
  
  <pre><code>Function GetTestClass(lngClassNo as long) as Object
    Dim strClassName as String    
    strClassName = "CTest" &amp; CStr(lngClassNo)
    Set GetTestClass = New instance of class(strClassName)
  End Function
  </code></pre>