+ Reply to Thread
Results 1 to 3 of 3

Multiple Checkbox with Command Button to execute Macro

  1. #1
    Registered User
    Join Date
    09-01-2011
    Location
    Seoul, South Korea
    MS-Off Ver
    Excel 2003
    Posts
    2

    Multiple Checkbox with Command Button to execute Macro

    I have a checklist generator that uses about 20 Checkboxes. The checklist consists of 750 rows of "steps" that should be included or excluded based on the results of all 20 Checkboxes. The individual checkboxes work fine.. but some steps are repeated so IF Checkbox 1 and 3 are checked I am able to resolve to the appropriate steps to complete the task.

    I want to be able to check between 1 - 19 checkboxes. Currently I use a formula in a cell to determine which boxes are checked and then "Hide" the appropriate rows to only show the necessary steps to successfuly complete the procedure.

    Rows 11 - 31 contain the checkbox logic such as true or false and there is a seperate cell that looks at the checkbox condition and assigns a value like... If Checkbox 1=True then Checkbox value in a seperate cell = 1 and if Checkbox 4 is checked True then the checkbox value in a seperate cell = 4.

    I want to be able to sum the total Checkbox values in the seperate cells and if the SUM is 5 then Macro X runs.... and I only want the appropriate macro to run when a command button ="Run Macros" is clicked.

    I'm a self taught Excel User so I don't know if there is a better logic secquence Such as Case or Select, etc for this task.. Any help would be appreciated.

    Sample for 1 Checkbox.
    Private Sub CheckBox6_Click()
    If CheckBox6 = True Then
    [57:58].EntireRow.Hidden = False
    [715:724].EntireRow.Hidden = False
    Else: [57:58].EntireRow.Hidden = True
    [715:724].EntireRow.Hidden = True
    End If
    End Sub

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Multiple Checkbox with Command Button to execute Macro

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    09-01-2011
    Location
    Seoul, South Korea
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Multiple Checkbox with Command Button to execute Macro

    Sorry for the rule violation.

    I have a checklist generator that uses about 20 Checkboxes. The checklist consists of 750 rows of "steps" that should be included or excluded based on the results of all 20 Checkboxes. The individual checkboxes work fine.. but some steps are repeated so IF Checkbox 1 and 3 are checked I am able to resolve to the appropriate steps to complete the task.

    I want to be able to check between 1 - 19 checkboxes. Currently I use a formula in a cell to determine which boxes are checked and then "Hide" the appropriate rows to only show the necessary steps to successfuly complete the procedure.

    Rows 11 - 31 contain the checkbox logic such as true or false and there is a seperate cell that looks at the checkbox condition and assigns a value like... If Checkbox 1=True then Checkbox value in a seperate cell = 1 and if Checkbox 4 is checked True then the checkbox value in a seperate cell = 4.

    I want to be able to sum the total Checkbox values in the seperate cells and if the SUM is 5 then Macro X runs.... and I only want the appropriate macro to run when a command button ="Run Macros" is clicked.

    I'm a self taught Excel User so I don't know if there is a better logic secquence Such as Case or Select, etc for this task.. Any help would be appreciated.

    Sample for 1 Checkbox.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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