Macro to Check only one box

N

nik_gujarathi

Hello friends,
I am a newbie to this forum. So this is my first thread
Here is what I was looking for.
I have two check box in cell J6 and K6. These check boxes are linked to
cell J6 and K6. I want the user to check only one box at any given
point i.e. either J6 or K6 (i.e. Value of J6 is "TRUE" and K6 is
"Flase" or vice viceversa). If the user checks both the boxes then
value of both the cells J6 and K6 will become true, *which needs to be
avoided*. I was looking for a macro which will get activated
automatically when the user checks any of the boxes, and will give a
error message to "SELECT ONLY ONE BOX" when the value for both the
cells J6 and K6 is same.
Refer attached sheet for proper explanation...........
Thank you


+-------------------------------------------------------------------+
|Filename: Check_Box_Problem.doc |
|Download: http://www.excelforum.com/attachment.php?postid=4775 |
+-------------------------------------------------------------------+
 
T

Tom Ogilvy

Optionbuttons support this concept without needing to use any code. Suggest
you use two optionbuttons from the control toolbox toolbar rather than two
checkboxes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

macros creating 1
Macros in Excel 1
Message Box Q 4
create macro - delete all rows with zero in column L 2
Formula & Macro 1
Formula & Macro 0
Some trouble assigning a string to a variable 22
HOW TO MERGE TWO MACROS 0

Top