R
rpardee
Hey All,
I want to handle a combobox AfterUpdate event from a separate class
module. The below doesn't seem to work, *unless* I also create a
separate AfterUpdate handler right in the form module. I don't want to
have to do that. Is there something else I can do?
' -------------------------------------------
' Here is the entire class module:
Private WithEvents cmb As ComboBox
Property Set c(x As ComboBox)
Set cmb = x
End Property
Private Sub cmb_AfterUpdate()
MsgBox "In after-update!"
End Sub
' -------------------------------------------
' In the form I do this:
Private m As Class1
Private Sub Form_Load()
Set m = New Class1
Set m.c = Me.Combo0
End Sub
' -------------------------------------------
It feels like the form doesn't create the combobox 'withevents' unless
there's a handler right in the form module. Is that what's going on?
If so, is there a way around it?
Thanks!
-Roy
I want to handle a combobox AfterUpdate event from a separate class
module. The below doesn't seem to work, *unless* I also create a
separate AfterUpdate handler right in the form module. I don't want to
have to do that. Is there something else I can do?
' -------------------------------------------
' Here is the entire class module:
Private WithEvents cmb As ComboBox
Property Set c(x As ComboBox)
Set cmb = x
End Property
Private Sub cmb_AfterUpdate()
MsgBox "In after-update!"
End Sub
' -------------------------------------------
' In the form I do this:
Private m As Class1
Private Sub Form_Load()
Set m = New Class1
Set m.c = Me.Combo0
End Sub
' -------------------------------------------
It feels like the form doesn't create the combobox 'withevents' unless
there's a handler right in the form module. Is that what's going on?
If so, is there a way around it?
Thanks!
-Roy