-
Scoping Problem...
I am developing an OCX, and i am having trouble with the Methods in an object.
The situation is this:
I have an ActiveX control, with two controls on it. In a certain Event, an object is passed to the Event. The method of the object, in turn, needs to execute a property of one of the controls on the user control.
i.e.
Code:
Private Sub MyOCX_MyEvent(mObj As CMObj)
mObj.Text = "Blah"
mObj.Activate 'This in turn calls one of the methods of one of the controls on the user control.
I originally thought i might be able to access the control method directly on the User Control (like Form1.Control1.Activate)... but it seems not.
Now, i am sorry if there is a simple solution, but i am new to ActiveX Development, and i woud appreciate any response on possible workarounds.
Thanks :)
-
I dont think you can call a generic object with an event. In order for you to execute the event of that control is to use a specific name of the object, like Form_Activate.
But if you have a sub/function that raises that event then you can.