riktek
Member
- Local time
- Today, 15:16
- Joined
- Dec 15, 2023
- Messages
- 174
Can a CustomControl be assigned to a CustomControl variable declared WithEvents?
I have an ActiveX control wrapper that successfully binds the ActiveX control and the form to suitably typed variables declared WithEvents.
The CustomControl class exposes a distinct set of events, however, so I was hoping to also sink those in the class, but no go. I get error 459, Object or class does not support the set of events. This seems quite odd because the class quite clearly is an event source, not to mention being a member of the Access library.
Is there a solution, or did someone forget to define a COM events interface for this control?
I'm also curious whether and how the CreateControl method might be exploited to add a COM-callable control not in the Access library to a form without use of the CustomControl class. Especially if the control is an event source that provides a COM events interface.
I'm developing in A2007 for the moment, if that matters.
I have an ActiveX control wrapper that successfully binds the ActiveX control and the form to suitably typed variables declared WithEvents.
The CustomControl class exposes a distinct set of events, however, so I was hoping to also sink those in the class, but no go. I get error 459, Object or class does not support the set of events. This seems quite odd because the class quite clearly is an event source, not to mention being a member of the Access library.
Is there a solution, or did someone forget to define a COM events interface for this control?
I'm also curious whether and how the CreateControl method might be exploited to add a COM-callable control not in the Access library to a form without use of the CustomControl class. Especially if the control is an event source that provides a COM events interface.
I'm developing in A2007 for the moment, if that matters.