Home > Software engineering >  VB6 class object is declared a global variable, but the object assignment does not take effect
VB6 class object is declared a global variable, but the object assignment does not take effect

Time:09-24

1, in the Modules of A declare A class object for global variables (Pulbic myObj As MyClass)
2, a function in the Modules B fun (), initialized to myObj (myObj=New MyClass)
3, through the class function called myObj times wrong, prompt object not assignment (myObj. Myfun () times wrong)

Hope to get a great god for help, thank you.

CodePudding user response:

1, the initialization to use: Set myObj=New MyClass
2, myfun must be global, namely:
The public function myfun (... )
End the function
  • Related