Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX can't create object

Status
Not open for further replies.

michaelcoleman

Programmer
Jun 26, 2003
21
US
I'm trying to dynamically instantiate class modules based on file input

so in my project i have a class module called: myClass.cls

I would like to do:

dim O as object
Set O = CreateObject("myProject.myClass")
...but it errors out with "ActiveX can't create object

You may be asking me why I'm doing it that way....Well there is some common code that will be doing this part that is shared on multiple projects. The specific class modules will hopefully be able to created by a dynamic createobject function from above.

I've already tried to make it an ActiveX project thinking it will register the classes but that didn't seem to work.

Regards,

MJC
 
You should create an ActiveX DLL to contain those objects. Add it to a project group containing the exe project and in the exe project, set a reference to the ActiveX DLL.

Paul Bent
Northwind IT Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top