Unhiding all rows based on All Checkbox being tickets.

ilbondo

New Member
Joined
Sep 19, 2018
Messages
4
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
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
.
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/share/8BSLYi40xEXwZMdCrI7kUpMsIQ9Vcnb9QFcnVkfrw42
 
Upvote 0
.
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/share/8BSLYi40xEXwZMdCrI7kUpMsIQ9Vcnb9QFcnVkfrw42

Thank you so much for that it has been eminently helpful. I wish you every success in future.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,253
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top