Hi,
Can someone please give an example of the usage of CreateObject()? O:-)
I need to create an instance of a class (defined in my app) whose name is in
the resource file.
I tried this:
call CreateClass(LoadResString(888))
but I get an exception complaining that 'The activeX component couldn't create
the object'. What the heck???? :-P
Any help would be appreciated. :-)
J French - 30 Jun 2004 07:40 GMT
>Hi,
>
[quoted text clipped - 6 lines]
>
>call CreateClass(LoadResString(888))
Eh ?
>but I get an exception complaining that 'The activeX component couldn't create
>the object'. What the heck???? :-P
If it is VB5/6 you are talking about :-
Set Obj = CreateObject( "DLLImternalName.ExposedClass" )
Andy Fish - 30 Jun 2004 10:50 GMT
> Hi,
>
[quoted text clipped - 11 lines]
>
> Any help would be appreciated. :-)
CreateObject is cunningly named to confuse the unwary. it is only used to
create a com object/activex server/com server or whatever it is called this
week
Assuming you just want to create an instance of a class module, I don't know
of any way of doing that by just having the name as a string