One Class two forms
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
I would like to create an instance of a Class on Form1 and be able to use that same instance on a second form. I want to avoid using global/public variables and collections in a module. Can this be done? :confused: -Joe
I guess you could create a get-property i Form1 that returns the instance of Class1: public property get TheProperty as Class1 set TheProperty = myInstance end property So from Form2 do this to get the Class1 instance from Form1: set obj=Form1.TheProperty Hope this helps... Øyvind.