PDA

Click to See Complete Forum and Search --> : Activex cannot create object


Gautam01
Nov 20th, 2001, 04:57 AM
I've created a buttonset component for browsing data in a form. When I press exit button on that, it executes the code:

unload usercontrol.parent

when usercontrol.parent is the form on which it is placed. Sometimes it shows error:

error '429': Activex cannot create object

what could be the cause for this?

jim mcnamara
Nov 20th, 2001, 05:44 AM
Unload UserControl
Unload Form

Don't unload the UserControl container form before you unload the control.

Gautam01
Nov 20th, 2001, 07:18 AM
Thx, checking this out. But how is that it occurs once in a while?

No. It didn't work.

When I put in exit_click()
unload usercontrol
unload usercontrol.parent
it gives compile error 'invalid use of base class'.

When I put in exit_click()
unload me
unload usercontrol.parent
it gives Run-time error '361': Can't load or unload this object

AndySoft
Nov 24th, 2001, 09:28 PM
Get to a command prompt and use "regsvr32" (or is it "regsrv32" :confused: ) to register it.

Example:


regsvr32 MyControl.ocx


(I'm pretty sure it's "regsvr32".)

That should do it. I get that problem all the time. I found a little shell enhancement that lets me right-click and ActiveX object (whether its an OCX or DLL) and register it... SO much easier!