msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Run-time error '429' : ActiveX can't create object

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise
Author Message
Lucy Ludmiller



Joined: 04 Oct 2007
Posts: 3

PostPosted: Wed Sep 06, 2006 4:25 am    Post subject: Run-time error '429' : ActiveX can't create object Reply with quote

Sorry about the cross posts, not sure which group is the most relevant,
since I am using C++, MFC/COM and VB6

I have written an MFC ActiveX control in C++. I want to use the control
in VB6. The component builds succesfully, and is succesfully registered
on my computer. I am able to reference it in a VB project and have the
component show in the "list of components" dialog.

I have declared my object in VB6 as this:

dim withevent m_control as MyControlLib.MyControl

I try to create an instance of it in VB6 like this:

set m_control = CreateObject("MyControlLib.MyControl")


I then get this error. Which by the way, I believe is a red herring
*i.e. misleading). The ocx is succesfully registered on my mchine, it is
on the path of my VB project and it has all the required dependencies. I
thought there may be a problem wth my control because it was quite
complicated (had a lot of C++ DLL dependencies), so I tried an MFC
control generated by the MFC wizard, and I added two methods and an
event. When i tried to use the component in VB - I had exactly the same
results.

Does anyone know how to instantiate/use an MFC activeX COM control in VB6 ?

Archived from group: microsoft>public>vb>controls
Back to top
View user's profile Send private message
Ralph



Joined: 04 Oct 2007
Posts: 4148

PostPosted: Wed Sep 06, 2006 2:23 am    Post subject: Re: Run-time error '429' : ActiveX can't create object Reply with quote

"Lucy Ludmiller" wrote in message@bt.com...
> Sorry about the cross posts, not sure which group is the most relevant,
> since I am using C++, MFC/COM and VB6
>
> I have written an MFC ActiveX control in C++. I want to use the control
> in VB6. The component builds succesfully, and is succesfully registered
> on my computer. I am able to reference it in a VB project and have the
> component show in the "list of components" dialog.
>
> I have declared my object in VB6 as this:
>
> dim withevent m_control as MyControlLib.MyControl
>
> I try to create an instance of it in VB6 like this:
>
> set m_control = CreateObject("MyControlLib.MyControl")
>
>
> I then get this error. Which by the way, I believe is a red herring
> *i.e. misleading). The ocx is succesfully registered on my mchine, it is
> on the path of my VB project and it has all the required dependencies. I
> thought there may be a problem wth my control because it was quite
> complicated (had a lot of C++ DLL dependencies), so I tried an MFC
> control generated by the MFC wizard, and I added two methods and an
> event. When i tried to use the component in VB - I had exactly the same
> results.
>
> Does anyone know how to instantiate/use an MFC activeX COM control in VB6
?
>

To add a control to VB open the Projects->Components (Ctrl+T).
[Be sure to go back and remove any reference to the control from
Project->References.]

-ralph

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group