having some difficulty figuring out how to collapse multiple rows. Here is my example of what i'm trying to do. I already understand the Checkbox VBA codes etc. Here is the formula VBA i'm putting in. Private Sub CheckBox1_Click()
[A30:H65].EntireRow.Hidden = CheckBox1
End Sub
Private Sub CheckBox2_Click()
[A14:H30].EntireRow.Hidden = CheckBox2
End Sub
Private Sub CheckBox3_Click()
[A14:H41].EntireRow.Hidden = CheckBox3
End Sub
Private Sub CheckBox4_Click()
[A14:H50].EntireRow.Hidden = CheckBox4
End Sub
Private Sub CheckBox5_Click()
[A14:H56].EntireRow.Hidden = CheckBox5
End Sub
I have 4 sections in the worksheet. If I click on one section, I want all the others to collapse. However, If i click on two sections, then I want both sections to stay open when i click on both sections, and the remaining collapsed. Same if i want 3 sections, and do on.... I was able to get the first part to work, but i can't figure out how to have multiple sections open, at the same time while having other collapsed. What am i doing wrong?
[A30:H65].EntireRow.Hidden = CheckBox1
End Sub
Private Sub CheckBox2_Click()
[A14:H30].EntireRow.Hidden = CheckBox2
End Sub
Private Sub CheckBox3_Click()
[A14:H41].EntireRow.Hidden = CheckBox3
End Sub
Private Sub CheckBox4_Click()
[A14:H50].EntireRow.Hidden = CheckBox4
End Sub
Private Sub CheckBox5_Click()
[A14:H56].EntireRow.Hidden = CheckBox5
End Sub
I have 4 sections in the worksheet. If I click on one section, I want all the others to collapse. However, If i click on two sections, then I want both sections to stay open when i click on both sections, and the remaining collapsed. Same if i want 3 sections, and do on.... I was able to get the first part to work, but i can't figure out how to have multiple sections open, at the same time while having other collapsed. What am i doing wrong?