Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default How to have Checkbox A uncheck with checked Checkbox B

I had the same issue. I wanted to use a checkbox and not option button
because option button control ever option button on the sheet. This is how I
was able to use checkboxes and have it when box A is check, box B become
unchecked.

Using a Forms Checkbox

Link your two checkboxes to their respective cells.
Checkbox A with A1
Checkbox B with B1

Then on Checkbox A us this code:

Option Explicit
Sub Checkbox_A()
Dim myCBX As CheckBox
Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
myCBX.TopLeftCell.Offset(0, 1).Value = False
End If

End Sub


Then on Checkbox B us this code:

Option Explicit
Sub Checkbox_B()
Dim myCBX As CheckBox
Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
myCBX.TopLeftCell.Offset(0, -1).Value = False
End If

End Sub


This will do the trick. I was tired of everyone telling me to use option
button so I did it myself.

p.s. - to not see the "TRUE/FALSE" under the checkboxed, just change the
color of the text to match the background

~Ryan
--
Silverbird Designs @ www.silverbirddesigns.com

Fighting Texas Aggie Class of 2009

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default How to have Checkbox A uncheck with checked Checkbox B

Why not just place your option buttons inside of frame controls. Then the
option buttons within one frame control have no effect on the option buttons
in other frame controls? Just a thought...
--
HTH...

Jim Thomlinson


"Texas Aggie" wrote:

I had the same issue. I wanted to use a checkbox and not option button
because option button control ever option button on the sheet. This is how I
was able to use checkboxes and have it when box A is check, box B become
unchecked.

Using a Forms Checkbox

Link your two checkboxes to their respective cells.
Checkbox A with A1
Checkbox B with B1

Then on Checkbox A us this code:

Option Explicit
Sub Checkbox_A()
Dim myCBX As CheckBox
Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
myCBX.TopLeftCell.Offset(0, 1).Value = False
End If

End Sub


Then on Checkbox B us this code:

Option Explicit
Sub Checkbox_B()
Dim myCBX As CheckBox
Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
myCBX.TopLeftCell.Offset(0, -1).Value = False
End If

End Sub


This will do the trick. I was tired of everyone telling me to use option
button so I did it myself.

p.s. - to not see the "TRUE/FALSE" under the checkboxed, just change the
color of the text to match the background

~Ryan
--
Silverbird Designs @ www.silverbirddesigns.com

Fighting Texas Aggie Class of 2009

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default How to have Checkbox A uncheck with checked Checkbox B

Mainly because every has told me to use option buttons and I prefer
checkboxes. I wanted to let everyone know that it can be done, and for the
reason I wanted to do something not a lot of people are willing to do nor
help with.
--
Silverbird Designs @ www.silverbirddesigns.com

Fighting Texas Aggie Class of 2009


"Jim Thomlinson" wrote:

Why not just place your option buttons inside of frame controls. Then the
option buttons within one frame control have no effect on the option buttons
in other frame controls? Just a thought...
--
HTH...

Jim Thomlinson


"Texas Aggie" wrote:

I had the same issue. I wanted to use a checkbox and not option button
because option button control ever option button on the sheet. This is how I
was able to use checkboxes and have it when box A is check, box B become
unchecked.

Using a Forms Checkbox

Link your two checkboxes to their respective cells.
Checkbox A with A1
Checkbox B with B1

Then on Checkbox A us this code:

Option Explicit
Sub Checkbox_A()
Dim myCBX As CheckBox
Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
myCBX.TopLeftCell.Offset(0, 1).Value = False
End If

End Sub


Then on Checkbox B us this code:

Option Explicit
Sub Checkbox_B()
Dim myCBX As CheckBox
Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
myCBX.TopLeftCell.Offset(0, -1).Value = False
End If

End Sub


This will do the trick. I was tired of everyone telling me to use option
button so I did it myself.

p.s. - to not see the "TRUE/FALSE" under the checkboxed, just change the
color of the text to match the background

~Ryan
--
Silverbird Designs @ www.silverbirddesigns.com

Fighting Texas Aggie Class of 2009

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default How to have Checkbox A uncheck with checked Checkbox B

To each his own. Most users are familar with CheckBoxes being multi select
while option buttons are mutually exclusive select but if you like check
boxes then more power to you.
--
HTH...

Jim Thomlinson


"Texas Aggie" wrote:

Mainly because every has told me to use option buttons and I prefer
checkboxes. I wanted to let everyone know that it can be done, and for the
reason I wanted to do something not a lot of people are willing to do nor
help with.
--
Silverbird Designs @ www.silverbirddesigns.com

Fighting Texas Aggie Class of 2009


"Jim Thomlinson" wrote:

Why not just place your option buttons inside of frame controls. Then the
option buttons within one frame control have no effect on the option buttons
in other frame controls? Just a thought...
--
HTH...

Jim Thomlinson


"Texas Aggie" wrote:

I had the same issue. I wanted to use a checkbox and not option button
because option button control ever option button on the sheet. This is how I
was able to use checkboxes and have it when box A is check, box B become
unchecked.

Using a Forms Checkbox

Link your two checkboxes to their respective cells.
Checkbox A with A1
Checkbox B with B1

Then on Checkbox A us this code:

Option Explicit
Sub Checkbox_A()
Dim myCBX As CheckBox
Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
myCBX.TopLeftCell.Offset(0, 1).Value = False
End If

End Sub


Then on Checkbox B us this code:

Option Explicit
Sub Checkbox_B()
Dim myCBX As CheckBox
Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
myCBX.TopLeftCell.Offset(0, -1).Value = False
End If

End Sub


This will do the trick. I was tired of everyone telling me to use option
button so I did it myself.

p.s. - to not see the "TRUE/FALSE" under the checkboxed, just change the
color of the text to match the background

~Ryan
--
Silverbird Designs @ www.silverbirddesigns.com

Fighting Texas Aggie Class of 2009

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I insert simple checkbox which can be checked by a click? mgreen74 Excel Discussion (Misc queries) 5 August 19th 09 04:31 PM
Inserting a simple checkbox that can be checked Phrank Excel Discussion (Misc queries) 4 May 17th 07 06:02 PM
How do I give a checked checkbox a value in excel(as .5)? Paula Excel Worksheet Functions 1 March 5th 06 11:32 PM
Is checkbox is checked? Fred S Excel Discussion (Misc queries) 2 October 19th 05 03:53 AM
set checkbox to enter date when checked and NOT recalculate Maliniemi Excel Worksheet Functions 4 June 9th 05 07:35 PM


All times are GMT +1. The time now is 07:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"