+ Reply to Thread
Results 1 to 8 of 8

master checkboxes to select a group of other checkboxes?

  1. #1
    Registered User
    Join Date
    10-20-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    15

    master checkboxes to select a group of other checkboxes?

    hey, I'm making a list on excel, it's actually 5 different lists in sequence, and each one of them will have a master checkbox wich selects all the checkboxes that are slaved to each item on it's list.

    I'm listing songs, and each list is a different album, so I want to be able to select each song separately (already done) select every song of an album at once, and also select all songs from the 5 albums, so I'd also need to have a master checkbox that selects "sub-master" checkboxes.

    I saw this tutorial Link but it's only helpful for selecting everything, so I also saw this post: Link but there must be a syntax error or something, and maybe I also don't quite understand it very well to apply it to my needs, because it returns an error message.

    any help is appreciated!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: master checkboxes to select a group of other checkboxes?

    Here is an example I did for someone recently but I'm concerned that if you had trouble with those tutorials, you may also have trouble with this. The key here is to set the TRUE/FALSE values associated with each checkbox.

    If you are having trouble adapting these solutions to your own situation then I suggest you attach a sample file for us to work on.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    10-20-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: master checkboxes to select a group of other checkboxes?

    thanks, but yeah, I don't know what exactly to do to adapt to my file, then sure I'll send my list, here it is:
    Attached Files Attached Files

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: master checkboxes to select a group of other checkboxes?

    I have assumed that any row with a formula to calculate time of selected songs is an album title with a master checkbox, and that the Total at the bottom is the Master Master. This solution is flexible so songs and albums can be added without changing code. However, your checkboxes for album titles and Total need to be linked to cells, just like the song checkboxes. Also it depends on the formulas you are using to add the total times, so the code can navigate and figure out what's an album title vs. what's a song. So be aware that if you change your formulas then you need to update code.

    I also corrected the formatting on your bottom total.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-20-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: master checkboxes to select a group of other checkboxes?

    thanks mate, that's pretty much everything I wanted. I did notice that adding songs work just fine, as you said, so thanks again.

    cheers

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: master checkboxes to select a group of other checkboxes?

    Glad to help. If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved.

    Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

  7. #7
    Registered User
    Join Date
    10-20-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: master checkboxes to select a group of other checkboxes?

    Hey, I'm revisiting this thread, because I wanted to add another album to the list, but apparently I can't manage to do that, it bugs out the checkboxes. While adding more songs works fine, a whole album is a problem. How to do so?
    (in fact it's not an actual album, but just another category to include songs that don't belong in an album).

    thanks in advance

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: master checkboxes to select a group of other checkboxes?

    The code is OK. You have to be aware of several things when you add data. I have attached an example with another album added.

    To add an album:

    Insert new lines above the "Total" row
    Copy the formula in column C for the total selected time to the new album row
    The checkbox on the row for the album must have an assigned macro of 'Repert鏎io Completo com tempo.xlsm'!AlbumCheckboxClick
    The checkboxes in the rows for the songs must have no macro assigned
    The checkboxes in the rows for the songs must be linked to the cell in column A of that row

    If you do all those things it should work. I think it's possible to automate the insertion of new albums and songs, but I'm afraid I don't have the time at the moment to do it for you.

+ 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. Using Checkboxes to Select Other Checkboxes
    By SoothSailor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2015, 12:48 PM
  2. Master/Slave checkboxes
    By ko6ux in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2014, 08:48 AM
  3. Replies: 4
    Last Post: 04-28-2013, 12:47 AM
  4. How to choose a group of checkboxes?
    By Silverado83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2013, 05:35 PM
  5. Print Sheets based on checkboxes in UserForm, Checkboxes also control another macro
    By krackaberr in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 03-05-2013, 11:12 AM
  6. Looping through a group of checkboxes
    By asdfasdf in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-12-2005, 10:05 PM
  7. How to select checkBoxes as a group in
    By Fendic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2005, 10:05 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