TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 301
- Office Version
- 365
- Platform
- Windows
Hello,
I have this clunky code:
Is there a quicker way? There are twelve checkboxes on the form so I'm going to have one of these for each one - plus, there may come a time when more checkboxes are introduced so I'm going to have to rewrite all of this.
Thanks in advance as always.
I have this clunky code:
VBA Code:
Private Sub CheckBox1_Change()
Select Case CheckBox1.Value
Case True
CheckBox2.Enabled = False
CheckBox3.Enabled = False
CheckBox4.Enabled = False
CheckBox5.Enabled = False
CheckBox6.Enabled = False
CheckBox7.Enabled = False
CheckBox8.Enabled = False
CheckBox9.Enabled = False
CheckBox10.Enabled = False
CheckBox11.Enabled = False
CheckBox12.Enabled = False
cbSubmit.Enabled = True
Case Else
CheckBox2.Enabled = True
CheckBox3.Enabled = True
CheckBox4.Enabled = True
CheckBox5.Enabled = True
CheckBox6.Enabled = True
CheckBox7.Enabled = True
CheckBox8.Enabled = True
CheckBox9.Enabled = True
CheckBox10.Enabled = True
CheckBox11.Enabled = True
CheckBox12.Enabled = True
cbSubmit.Enabled = False
End Select
End Sub
Is there a quicker way? There are twelve checkboxes on the form so I'm going to have one of these for each one - plus, there may come a time when more checkboxes are introduced so I'm going to have to rewrite all of this.
Thanks in advance as always.