Raising Events from ActiveX Control
I'm going to post this in the other forum, too.
Here's the deal...
I have an ActiveX control that I wrote. I have custom events that I raise from code like AxInitializationComplete, and ErrorTrapped.
When hosted on a vb form all my events raise as expected. When hosted on a web page in Internet Explorer, the only events that fire are ones in which RaiseEvent is called in an event raised by the control or its constituent controls.
I know some of you are going, "HUH?"
If I call RaiseEvent from any Method that I wrote, the event does not bubble up to IE. If I call RaiseEvent in say, cboInput_Click(), my events raise.
VB Code:
Option Explicit
Event ErrorTrapped()
Event AxInitializationComplete()
Event UserSelected()
Event ControlGotFocus()
Private Sub cboInput_LostFocus()
RaiseEvent UserSelected 'OK
End Sub
Private Sub UserControl_Initialize()
Call Init()
End Sub
Private Function Init()
RaiseEvent AxInitializationComplete 'Does Not Work
End Sub