Unhiding all rows based on All Checkbox being tickets.
Results 1 to 4 of 4

Thread: Unhiding all rows based on All Checkbox being tickets.
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Sep 2018
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Unhiding all rows based on All Checkbox being tickets.

    Hi

    I have searched youtube for the answer to what i hope is a simple question. I have 6 checkboxes on an excel sheets, i want a bunch of rows beneath those checkboxes to unhide but only if All 6 of the checkboxes are ticked.

    Thanks in advance

  2. #2
    Board Regular Logit's Avatar
    Join Date
    Aug 2016
    Location
    United States
    Posts
    2,730
    Post Thanks / Like
    Mentioned
    36 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Unhiding all rows based on All Checkbox being tickets.

    .
    Code:
    Option Explicit
    
    
    Sub checkBoxSet()
    Dim chk As CheckBox
    Dim ws As Worksheet
    Set ws = ActiveSheet
    Dim i As Integer
    i = 0
    
    
    For Each chk In ws.CheckBoxes
        If chk.Value = 1 Then i = i + 1
    Next chk
    
    
    If i = 6 Then
       Sheet1.Rows("23:25").EntireRow.Hidden = False
    End If
    End Sub
    
    
    Sub HideRows()
        Sheet1.Rows("23:25").EntireRow.Hidden = True
    End Sub

    Download workbook : https://www.amazon.com/clouddrive/sh...nb9QFcnVkfrw42

  3. #3
    New Member
    Join Date
    Sep 2018
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Unhiding all rows based on All Checkbox being tickets.

    Quote Originally Posted by Logit View Post
    .
    Code:
    Option Explicit
    
    
    Sub checkBoxSet()
    Dim chk As CheckBox
    Dim ws As Worksheet
    Set ws = ActiveSheet
    Dim i As Integer
    i = 0
    
    
    For Each chk In ws.CheckBoxes
        If chk.Value = 1 Then i = i + 1
    Next chk
    
    
    If i = 6 Then
       Sheet1.Rows("23:25").EntireRow.Hidden = False
    End If
    End Sub
    
    
    Sub HideRows()
        Sheet1.Rows("23:25").EntireRow.Hidden = True
    End Sub

    Download workbook : https://www.amazon.com/clouddrive/sh...nb9QFcnVkfrw42
    Thank you so much for that it has been eminently helpful. I wish you every success in future.

  4. #4
    Board Regular Logit's Avatar
    Join Date
    Aug 2016
    Location
    United States
    Posts
    2,730
    Post Thanks / Like
    Mentioned
    36 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Unhiding all rows based on All Checkbox being tickets.

    .
    You are welcome. Glad to help.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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