Event to run when hitting a Checkbox

goldfish

Well-known Member
Joined
Aug 23, 2005
Messages
712
I have two sets of checkboxes, set A and set B. If you hit a checkbox in set A I would like all the boxes in set B to become true, and if you hit a checkbox in set B I would like all the boxes in set A to become true.

The easiest method to do this would just be to assign a macro to each of the checkboxes in set A that says Range("R1:R85")=TRUE (set all set B checkboxes to TRUE) and a macro to each of the checkboxes in set B that says Range("M1:M85")=TRUE.

Assigning a macro like this doesn't work however, because my check boxes are pretty close together and when I assign a macro some buttons become impossible to hit as the area over them triggers nearby checkboxes instead. So my next best solution would probably be to trigger an event instead, but as far as I can tell worksheet_change event isn't triggered by hitting a checkbox.

Is there another event that is triggered when hitting a check box? or is there some other way I can accomplish my goal with or without macros?

Thanks,
~Gold Fish
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
is that your way of saying that no event is triggered?

Checkboxes would be prefered because of their look and feel.

I wish I could just make these checkboxes smaller, they have so much "border" area around them... I've been playing around with "bring to front" which has helped a little, since the checkboxes upper lip is larger and more interfering than the lower lip, so if the ones closer to the top of the page are the most forward shapes, it works a bit better. But still it is easy to hit what looks to be when check box and see the one above it or below it activate.

Any ways of making them smaller? or otherways of dealing with their area? I could spread them farther out, but the distance has to be pretty large and will just make users have to scroll further.
~Gold Fish
 
Upvote 0
is that your way of saying that no event is triggered?
NO, not at all!! The value of each cell when it is a check is an "a". This will trigger a WorkSheet_Change Event. You simply need to isolate the target cells.
I'm sorry I can't be more helpful, but this is Wildfire season in Montana (and we have some BIG ones) and I stay pretty busy doing volunteer work for the Firefighters

lenze
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top