+ Reply to Thread
Results 1 to 3 of 3

Master/Slave checkboxes

  1. #1
    Registered User
    Join Date
    12-10-2014
    Location
    Corona, CA
    MS-Off Ver
    2013
    Posts
    1

    Master/Slave checkboxes

    Hi,

    I am looking for some help setting up groups of master/slave checkboxes on a worksheet.

    I would like the Master checkbox to control the checked/unchecked state of the slave checkboxes. If the master checkbox is unchecked, then the slave checkboxes should be able to be checked/unchecked independently.

    I have five master checkboxes named Master1, Master2, Master3, etc.

    The slave checkboxes follow the naming convention Master1_Child1, Master1_Child2, Master2_Child1, Master2_Child2, etc.

    There are 3 slave checkboxes that I want to associate with the Master1 checkbox, 5 checkboxes for Master2, 4 for Master3, 15 for Master4 and 23 for Master5.

    Can anyone help with the necessary code?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Master/Slave checkboxes

    Hi ko6ux and welcome to ExcelForum,

    Excellent question. You didn't specify what type of CheckBoxes, so I am assuming the CheckBoxes are 'Active X' CheckBoxes on the WorkSheet. If your CheckBoxes are 'Forms CheckBoxes', then the code will have to be modified. If you need more information about the difference, see the following thread: http://www.excelforum.com/excel-prog...ml#post3880991

    See the attached sample file, which uses one ClassEvent to handle all CheckBox clicks (Thank you Andy Pope). When the Master CheckBox is On, I had no way to determine the state of the other CheckBoxes. I added a Subordinate Master CheckBox for each Master CheckBox that determines the On/Off State of the other CheckBoxes.

    'ThisWorkBook' Module Code (for initialization):
    Please Login or Register  to view this content.
    Class Module 'ClassCheckBoxEvent' code:
    Please Login or Register  to view this content.
    Ordinary Code module code 'ModCheckBoxes':
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Master/Slave checkboxes

    I see said the blind carpenter as he picked up his hammer and saw. My original post made things a lot more complicated than they should have been. The 'Subordinate Master CheckBox' scheme that i dreamed up works, but is completely unnecessary. See the attached workbook and the complete code that follows.

    Lewis


    'ThisWorkBook' Module Code (for initialization):
    Please Login or Register  to view this content.
    Class Module 'ClassCheckBoxEvent' code:
    Please Login or Register  to view this content.
    Ordinary Code module code 'ModCheckBoxes':
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Data between master and slave worksheets
    By estimatingguy in forum Excel General
    Replies: 0
    Last Post: 10-14-2011, 11:47 AM
  2. Master and slave workbooks
    By Lizzietish11 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-31-2009, 02:21 PM
  3. Pass protection from a master to a slave workbook
    By Ducatisto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2009, 03:59 AM
  4. Master & Slave Check Boxes
    By flmoose in forum Excel General
    Replies: 9
    Last Post: 06-06-2008, 03:25 PM
  5. Master/slave files
    By Dohmaker in forum Excel General
    Replies: 1
    Last Post: 02-05-2008, 02:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1