vb6 :create object dynamically -


in vb6, can :

set object=new class 

where object object , class class defined in code.

now, want same dynamically, want like:

set object=createobject("class") 

but fail because createobject apparently activex registered class , not class modules.

i hope reason want mimic sort of interface-like functionality, otherwise it's not ideal solution.

anyway, create method gives different class depending on string provide.

function myclasscreatingfunction(classname)     select classname          case: "class1"              set myclasscreatingfunction = new class1              exit function          ...      end select end function 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -