After 3 days of trying every permutation, I give up. I need help. I have an ActiveX control consisting of a usercontrol interface and several forms, created using VB6. The usercontrol has a number of command buttons which, when clicked, load and display the respective forms they are linked to. After working with the form, the user clicks a "Done" button to get back to the "command center" at the usercontrol interface (which has been residing underneath the form that was being used).
Here's the problem: I want to invoke a procedure in the usercontrol that changes its display fields according to the data entered on whatever form was being used. I have a "Startup" procedure in the usercontrol to do this. However, no matter what I've tried in order to invoke the Startup procedure from the form, it doesn't recognize any object name I use to refer to the usercontrol. I always get an "error 424, object required", or "object variable ... not set".
Here are the references I've tried unsuccessfully:
(the name of the usercontrol within the
activex object is ACC; the name given to
the whole control when it is instantiated
within its container program is ACC1; the
name of the procedure in the usercontrol
I want to access is "Startup"
ACC.Startup
ACC1.Startup
ContainerName.ACC.Startup
ContainerName.ACC1.Startup
usercontrol.Startup
ActiveXControlName.ACC.Startup
ActiveXControlName.ACC1.Startup
And all remotely plausible combinations of the above.
I've tried to declare ACC and ACC1 as public instances of usercontrol and of each other (in a separate module I included in the control for all public declarations.)
You should also know that when I invoke the usercontrol from the container vb6 program, using "Call ACC1.Startup", it invariably starts up with no problem. The problem arises in trying to call back to the usercontrol once you're in one of the forms.
I'm out of things to try. I would be most grateful for any help you all can provide.
Here's the problem: I want to invoke a procedure in the usercontrol that changes its display fields according to the data entered on whatever form was being used. I have a "Startup" procedure in the usercontrol to do this. However, no matter what I've tried in order to invoke the Startup procedure from the form, it doesn't recognize any object name I use to refer to the usercontrol. I always get an "error 424, object required", or "object variable ... not set".
Here are the references I've tried unsuccessfully:
(the name of the usercontrol within the
activex object is ACC; the name given to
the whole control when it is instantiated
within its container program is ACC1; the
name of the procedure in the usercontrol
I want to access is "Startup"
ACC.Startup
ACC1.Startup
ContainerName.ACC.Startup
ContainerName.ACC1.Startup
usercontrol.Startup
ActiveXControlName.ACC.Startup
ActiveXControlName.ACC1.Startup
And all remotely plausible combinations of the above.
I've tried to declare ACC and ACC1 as public instances of usercontrol and of each other (in a separate module I included in the control for all public declarations.)
You should also know that when I invoke the usercontrol from the container vb6 program, using "Call ACC1.Startup", it invariably starts up with no problem. The problem arises in trying to call back to the usercontrol once you're in one of the forms.
I'm out of things to try. I would be most grateful for any help you all can provide.