ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Check box logic question (https://www.excelbanter.com/excel-worksheet-functions/198995-check-box-logic-question.html)

Ailsa02

Check box logic question
 
How do I create a series of check boxes that when you check the second box,
the first box will automatically uncheck?

Gary Brown[_4_]

Check box logic question
 
Private Sub CheckBox1_Change()
If CheckBox1 = True Then
CheckBox2 = False
End If
End Sub

Private Sub CheckBox2_Change()
If CheckBox2 = True Then
CheckBox1 = False
End If
End Sub

--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown


"Ailsa02" wrote:

How do I create a series of check boxes that when you check the second box,
the first box will automatically uncheck?


Ailsa02

Check box logic question
 
Gary,

You are soooo the man! Thank you! That worked perfectly!

Ailsa

"Gary Brown" wrote:

Private Sub CheckBox1_Change()
If CheckBox1 = True Then
CheckBox2 = False
End If
End Sub

Private Sub CheckBox2_Change()
If CheckBox2 = True Then
CheckBox1 = False
End If
End Sub

--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown


"Ailsa02" wrote:

How do I create a series of check boxes that when you check the second box,
the first box will automatically uncheck?


T. Valko

Check box logic question
 
Use option buttons. This is their normal behavior.

--
Biff
Microsoft Excel MVP


"Ailsa02" wrote in message
...
How do I create a series of check boxes that when you check the second
box,
the first box will automatically uncheck?




ggraves1968

Check box logic question
 
I have a group of check boxes that if you click on one I want to increase a
series of discounts offered and when you uncheck it reverts back to the
original data. The trick is that I have 10 choices that I want to increase
or decrease based on the accumulation of boxes checked and if none are
checked it goes back to my original data.

Any ideas?
--
Ggraves


"Gary Brown" wrote:

Private Sub CheckBox1_Change()
If CheckBox1 = True Then
CheckBox2 = False
End If
End Sub

Private Sub CheckBox2_Change()
If CheckBox2 = True Then
CheckBox1 = False
End If
End Sub

--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown


"Ailsa02" wrote:

How do I create a series of check boxes that when you check the second box,
the first box will automatically uncheck?



All times are GMT +1. The time now is 10:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com