I have 3 Checkboxs each assigned with a different name. For some reason whenever an event fires, it only recognize one checkbox at a time. I can't figure it out how to make all the checkboxs active using withEvents statement.
Can anyone help?
Option Explicit
Private WithEvents mCheckBox As MSForms.CheckBox
Private WithEvents mCheckBox2 As MSForms.CheckBox
Private WithEvents mcheckbox3 As MSForms.CheckBox
Public Property Set ControlTop1(CheckBox As MSForms.CheckBox)
Set mCheckBox = CheckBox
End Property
Public Property Set ControlTop5(CheckBox As MSForms.CheckBox)
Set mCheckBox2 = CheckBox
End Property
Public Property Set ControlAll(CheckBox As MSForms.CheckBox)
Set mcheckbox3 = CheckBox
End Property
Private Sub mCheckBox_Change()
If mCheckBox.Value = True Then
mCheckBox2.Value = False
mcheckbox3.Value = False
End If
End Sub
Private Sub mCheckBox2_Change()
If mCheckBox2.Value = True Then
mCheckBox.Value = False
mcheckbox3.Value = False
End If
End Sub
Private Sub mCheckBox3_Change()
If mcheckbox3.Value = True Then
mCheckBox.Value = False
mCheckBox2.Value = False
End If
End Sub
Bookmarks