MountainVogu
06-15-2006, 02:40 AM
Hi,
please see attached example
I have captured the events of a number of controls in a userform using a class module
I am aware that each control (Label, ComboBox etc) have their on set of event triggers some being common to both. But is it necessary to define a new class for each type of control ?
In the userform Declarations
Dim Cmds() As New Class1
Dim Lbls() As New Class1
Dim Combos() As New Class1
in the class declarations
Public WithEvents CmdControl As MSForms.CommandButton
Public WithEvents LblControl As MSForms.Label
Public WithEvents ComboControl As MSForms.ComboBox
Is it possible to pick up all userform controls and capture the event triggers with more finess than my attempt.
Because not when I try something like
Public WithEvents FrmControls As MSForms.Controls it has a spit
ALSO can someone tell me why the event triggers behind the control itself sometimes differ from that when using the with events in the class. For example no exit event in the class combocontrol but there is on the userform.
Thx a million
please see attached example
I have captured the events of a number of controls in a userform using a class module
I am aware that each control (Label, ComboBox etc) have their on set of event triggers some being common to both. But is it necessary to define a new class for each type of control ?
In the userform Declarations
Dim Cmds() As New Class1
Dim Lbls() As New Class1
Dim Combos() As New Class1
in the class declarations
Public WithEvents CmdControl As MSForms.CommandButton
Public WithEvents LblControl As MSForms.Label
Public WithEvents ComboControl As MSForms.ComboBox
Is it possible to pick up all userform controls and capture the event triggers with more finess than my attempt.
Because not when I try something like
Public WithEvents FrmControls As MSForms.Controls it has a spit
ALSO can someone tell me why the event triggers behind the control itself sometimes differ from that when using the with events in the class. For example no exit event in the class combocontrol but there is on the userform.
Thx a million