|
-
Jul 18th, 2005, 05:30 PM
#1
Thread Starter
Member
CreateObject, New, ActiveX exe involved
Hello,
I have a ActiveX exe project and a standard project. My standard project reference ActiveX exe project.
To make it simple, I have one class module in the ActiveX exe project and I need to create an instance of the class in a new thread in the Standard project. These are how I've been tring:
In the standard exe:
Dim objMyClass As ProjectName.MyClass
Set objMyClass = CreateObject(ProjectName.MyClass);
I get the object successfully ONLY IF I have class_initialize in MyClass as Public or I have THIS LINE at the beginning of my MyClass module
Class MyClass As MyClass
I find it more intersting, when I put these lines in my standard exe, it also works:
Dim objMyClass As ProjectName.MyClass
Set objMyClass = New MyClass;
I'm not sure how vb6 make a class publicly creatable and I don't know why what I tried works. I just guess and that works for me. I'd like to know WHY if anyone can help me really appreciate it. I've checked MSDN but no luck until now. Thanks all.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|