Why are you trying to hide rows on the spreadsheet?
Just toggle the
Visible
property of the Checkbox, e.g. putting this code into the ThisWorkbook VBA module works for me
Option Explicit
Private Sub Two_zero_Click()
If Two_zero.Value Then
two_one_WP.Visible = True
Else
two_one_WP.Visible = False
End If
End Sub
It's worth noting that the Checkbox objects I used were the ActiveX controls not the Form Controls. If you use the Form Controls then you need something like this instead
Sub Two_zero_Click()
If ActiveSheet.Shapes("Two_zero").ControlFormat.Value = 1 Then
Sheets("Sheet1").Shapes("two_one_WP").Visible = True
Else
Sheets("Sheet1").Shapes("two_one_WP").Visible = False
End If
End Sub
[Edit after OP comment]
You claim that the code above "disrupts" your code to hide rows. It can't.
If you want all the sub-category checkboxes to also disappear then you could just expand the code I've given you to include all of them. There is nothing to stop you hiding the rows as well if that is what you want to do.
However, if you are trying to hide the checkboxes
by hiding the rows that they are on then you need to set them to "Move and Size with Cells". The accepted answer on
this StackOverflow post[
^] will show you how to do that (it depends on which version of Excel you are using).
Once you have set that property on the checkbox(es) then when you hide a row the checkbox "on" that row will also be hidden.