Create Objects Dynamically

  • Hi,

    Is there a way to create objects dynamically? for example, I know that I need to many create objects of a class, but I don't know how many objects I need before hand. Does VB allow you to create objects on the fly? If so, how can it be done? Thanks.


  • Re: Create Objects Dynamically

    I have a custom class x, and I want to creat objects of x as objx1, objx2, objx3, etc. But I don't know exactly how many objects of class x I need before hand. Is VBA capable of generating these objects at run time?

  • Re: Create Objects Dynamically

    Your problem started at the edge of my knowlege and lept off. I'm pretty sure that it can. The part of my VB book that I don't understand yet, implies that if a class is created in a class module, creating "an instance of that class" at runtime is easy.
    Good luck.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!