#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Checkbox Question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Checkbox Question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Checkbox Question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Checkbox Question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Checkbox Question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Checkbox Question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Checkbox Question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Checkbox Question

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
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
Code question for clearing a command checkbox. Newbeetle Excel Discussion (Misc queries) 4 February 13th 07 09:05 AM
Checkbox Question MCrum Excel Discussion (Misc queries) 1 January 15th 07 12:38 PM
checkBox help!!! riggi Excel Discussion (Misc queries) 1 December 6th 06 09:31 PM
Checkbox question Adam Kroger Excel Discussion (Misc queries) 0 December 19th 05 12:41 PM
checkbox Chas Excel Worksheet Functions 2 May 13th 05 10:37 PM


All times are GMT +1. The time now is 03:08 PM.

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

About Us

"It's about Microsoft Excel"