Hi all!
I built a usercontrol (JaNee), which fires an event called "Changed" when the optionbutton it contains is clicked.
The control is added to a parent usercontrol at runtime using Controls.add, like this:
I use the following to catch the event:Code:Private WithEvents m_Ctl As VBControlExtender ... Set m_Ctl = Controls.Add("MyControls.JaNee", "jnValue") m_Ctl.Visible = True
This works fine for other usercontrols I've built, but for some particular reason, the ObjectEvent is not fired for this usercontrol.Code:Private Sub m_Ctl_ObjectEvent(Info As EventInfo) If Info.Name = "Changed" Then MsgBox "Hello World!" End If End Sub
Any ideas guys? There has to be a logical explanation.





Reply With Quote