I created a UserForm with 2 CheckBoxes. CheckBox1 is labeled Yes while CheckBox2 is labeled No. How can I format the UserForm so if CheckBox1 is selected CheckBox2 cannot be selected and if CheckBox2 is selected CheckBox1 cannot be selected? Below is the code I am using but it is not doing anything. I am not even getting an error message. Can you help?
Code:
[FONT=Times New Roman][SIZE=3]Sub CheckBoxes()[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Dim bChk1 As Boolean, bChk2 As Boolean[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]End Sub[/SIZE][/FONT]
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]</o:p>
[FONT=Times New Roman][SIZE=3]Sub CheckBox1_Click()[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Application.EnableEvents = False[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]If bChk2 = False Then Exit Sub[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]bChk1 = Not bChk2[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Call CheckBox2_Click[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Application.EnableEvents = True[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]End Sub[/SIZE][/FONT]
<o:p>[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]</o:p>
[FONT=Times New Roman][SIZE=3]Sub CheckBox2_Click()[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Application.EnableEvents = False[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]If bChk1 = False Then Exit Sub[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]bChk2 = Not bChk1[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Call CheckBox1_Click[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Application.EnableEvents = True[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]End Sub[/SIZE][/FONT]