It looks like you are wanting a checkbox that will drive some other check boxes.
That got me thinking that if one checked the Master box, all the subordinates would become checked.
But if the user then unchecked one of the subordinates, that would make the Master out of synch with the situation.
So I came up with this.
In the attached, if the user checks cbxVegitables (the master checkbox), then cbxLettuce, cbxBroccoli and cbxCarrots (the subordinates) will all be checked.
If the user then un-checks cbxBroccoli, the subordinate checkboxes will not be the same and cbxVegitables will show Null rather than checked or unchecked. If the user un-checks all of the subordinates, the the Master will change from Null to unchecked.
Similarly with the master checkbox, cbxFruit and its subordinates Apples, Banana, Grapes and Oranges.
And it is expandable. cbxProduce is master to the subordinates cbxFruit and cbxVegitables.
This uses Class modules and the Intialize event shows how to set-up the master/subordinate relationships.
I hope this helps your project.
Each of the checkboxes can be accessed as usual with event code in the Userform module. BUT, one has to account for the possibility that a master checkbox might have a null value, with code like this. Bottom level subordinate checkboxes are normal and not triple-state (unless set so by you)
Bookmarks