Linking Multiple Check Boxes Together

Swins

New Member
Joined
Jul 28, 2015
Messages
7
Hi All

I have a Office 365 spreadsheet with 23 check boxes for categories for sweets (the check boxes either hide or show a row in another sheet).

I also want to add a couple of check Boxes that will select all the "chocolate" (checkbox 24) sweets and deselect the remainder or select all the "Boiled Sweets" (Checkbox 25) and then deselect the remainder.

Also i want to only be able to check either Chocolate or Boiled Sweets (checkbox 24 & 25).

Any Suggestions??? and I hope I have expalined myself well enough

Thanks
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Re: HELP! with Linking Multiple Check Boxes Together

Hello,

Something on the lines of

Code:
    ActiveSheet.Shapes.Range(Array("Check Box 1", "Check Box 3", "Check Box 4")).Select
    With Selection
        .Value = 1
    End With
    ActiveSheet.Shapes.Range(Array("Check Box 5", "Check Box 7", "Check Box 9")).Select
    With Selection
        .Value = 0
    End With

You will need to change the name of the check boxes to suit, and add all of the others.

Not sure what you mean by 'Also i want to only be able to check either Chocolate or Boiled Sweets (checkbox 24 & 25).'

If you mean that you don;t want to select all the Chocolate ones then something like this perhaps?

Code:
    MY_ANS = MsgBox("Do you want to select all chocolate?", vbYesNo, "CHOICE")
    If MY_ANS = vbYes Then
        ActiveSheet.Shapes.Range(Array("Check Box 1", "Check Box 3", "Check Box 4")).Select
        With Selection
            .Value = 1
        End With
        ActiveSheet.Shapes.Range(Array("Check Box 5", "Check Box 7", "Check Box 9")).Select
        With Selection
            .Value = 0
        End With
    End If
 
Upvote 0
Re: HELP! with Linking Multiple Check Boxes Together

Thanks that is exactly what I was after
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

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