Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Folks:
I have a sheet with two checkboxes for the selection of two options (that can not be used together). Is there a way that if for example, box A is checked, box B is unchecked ?? Thanks much Steve |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You want to use option buttons, not checkboxes.
"slow386" wrote: Hi Folks: I have a sheet with two checkboxes for the selection of two options (that can not be used together). Is there a way that if for example, box A is checked, box B is unchecked ?? Thanks much Steve |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I may be looking in the wrong location, but - - - my option buttons do not
have a tab for Format Control and a cell link location !! I'm using Excel 2003 with SP2 on XP-Pro with all SP's I checked two other machines in the office, and they both have the proper tab. Any thoughts?? "JMay" wrote in message ... You want to use option buttons, not checkboxes. "slow386" wrote: Hi Folks: I have a sheet with two checkboxes for the selection of two options (that can not be used together). Is there a way that if for example, box A is checked, box B is unchecked ?? Thanks much Steve |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
There are 2 different kinds of option buttons and they are found in
different locations, the Forms Toolbar and the Control Toolbox. Those in the Control Toolbox are designed to be used with VBA code. You should use the option buttons from the Forms Toolbar. Right click any toolbar and then select Forms. You'll see the option button. Biff "slow386" wrote in message ... I may be looking in the wrong location, but - - - my option buttons do not have a tab for Format Control and a cell link location !! I'm using Excel 2003 with SP2 on XP-Pro with all SP's I checked two other machines in the office, and they both have the proper tab. Any thoughts?? "JMay" wrote in message ... You want to use option buttons, not checkboxes. "slow386" wrote: Hi Folks: I have a sheet with two checkboxes for the selection of two options (that can not be used together). Is there a way that if for example, box A is checked, box B is unchecked ?? Thanks much Steve |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try the optionbuttons from the Forms toolbar (not from the Control Toolbox
toolbar). But you could change the .linkedcell property if you want to use the optionbuttons from the Control Toolbox toolbar. slow386 wrote: I may be looking in the wrong location, but - - - my option buttons do not have a tab for Format Control and a cell link location !! I'm using Excel 2003 with SP2 on XP-Pro with all SP's I checked two other machines in the office, and they both have the proper tab. Any thoughts?? "JMay" wrote in message ... You want to use option buttons, not checkboxes. "slow386" wrote: Hi Folks: I have a sheet with two checkboxes for the selection of two options (that can not be used together). Is there a way that if for example, box A is checked, box B is unchecked ?? Thanks much Steve -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You guys are great - thanks.
As my grandfather used to say, you need the right tool for the job. Steve "Dave Peterson" wrote in message ... Try the optionbuttons from the Forms toolbar (not from the Control Toolbox toolbar). But you could change the .linkedcell property if you want to use the optionbuttons from the Control Toolbox toolbar. slow386 wrote: I may be looking in the wrong location, but - - - my option buttons do not have a tab for Format Control and a cell link location !! I'm using Excel 2003 with SP2 on XP-Pro with all SP's I checked two other machines in the office, and they both have the proper tab. Any thoughts?? "JMay" wrote in message ... You want to use option buttons, not checkboxes. "slow386" wrote: Hi Folks: I have a sheet with two checkboxes for the selection of two options (that can not be used together). Is there a way that if for example, box A is checked, box B is unchecked ?? Thanks much Steve -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I had the same issue. I wanted to use a checkbox and not option buttons
because option buttons control every option button on the sheet. This is how I was able to use checkboxes and have it when box A is check, box B becomes unchecked. Link your checkboxes to their respective cells. Checkbox A with A1 Checkbox B with B1 Then on Checkbox A use 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 use 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 "slow386" wrote: Hi Folks: I have a sheet with two checkboxes for the selection of two options (that can not be used together). Is there a way that if for example, box A is checked, box B is unchecked ?? Thanks much Steve |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you use optionbuttons from the Forms toolbar, you can place each group in its
own groupbox. Then they will behave the way you want. Texas Aggie wrote: I had the same issue. I wanted to use a checkbox and not option buttons because option buttons control every option button on the sheet. This is how I was able to use checkboxes and have it when box A is check, box B becomes unchecked. Link your checkboxes to their respective cells. Checkbox A with A1 Checkbox B with B1 Then on Checkbox A use 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 use 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 "slow386" wrote: Hi Folks: I have a sheet with two checkboxes for the selection of two options (that can not be used together). Is there a way that if for example, box A is checked, box B is unchecked ?? Thanks much Steve -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code question for clearing a command checkbox. | Excel Discussion (Misc queries) | |||
Checkbox Question | Excel Discussion (Misc queries) | |||
checkBox help!!! | Excel Discussion (Misc queries) | |||
Checkbox question | Excel Discussion (Misc queries) | |||
checkbox | Excel Worksheet Functions |