Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / June 2004



Tip: Looking for answers? Try searching our database.

How to use CreateObject()?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fernando Rodríguez - 29 Jun 2004 16:50 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.