Can two separate toggle buttons cover a similar range?
Let me explain...
Essentially I want them to work together very similar to a file tree
Category 1
Child category 1
Data
Data
Data
Child category 2
Data
Data
Category 2
First I placed all the categories, sub categories, and data. I then added a togglebutton for each sub category and was able to minimize them all just fine. I then placed one in the parent category covering the full range and suddenly all my sub categories would no longer minimize/expand....
Here is my code
**NOTE THIS IS MY PARENT CATEGORY******
Private Sub TogBtnGameCollection_Click()
Dim cells As String
cells = "51:77"
If TogBtnGameCollection.Value = True Then
Application.ActiveSheet.Rows(cells).Hidden = False
TogBtnGameCollection.Caption = "-"
Else
Application.ActiveSheet.Rows(cells).Hidden = True
TogBtnGameCollection.Caption = "+"
End If
End Sub
****NOTE THIS IS THE FORMAT OF MY CHILD CATEGORIES*****
Private Sub TogBtnPlaystation3_Click()
Dim cells As String
cells = "52:57"
If TogBtnPlaystation3.Value = True Then
Application.ActiveSheet.Rows(cells).Hidden = False
TogBtnPlaystation3.Caption = "-"
Else
Application.ActiveSheet.Rows(cells).Hidden = True
TogBtnPlaystation3.Caption = "+"
End If
End Sub
As I said the sub categories all worked great until I put the one covering all of them. Is there a way to do this? If toggle Buttons Can't do it can something else?
Let me explain...
Essentially I want them to work together very similar to a file tree
Category 1
Child category 1
Data
Data
Data
Child category 2
Data
Data
Category 2
First I placed all the categories, sub categories, and data. I then added a togglebutton for each sub category and was able to minimize them all just fine. I then placed one in the parent category covering the full range and suddenly all my sub categories would no longer minimize/expand....
Here is my code
**NOTE THIS IS MY PARENT CATEGORY******
Private Sub TogBtnGameCollection_Click()
Dim cells As String
cells = "51:77"
If TogBtnGameCollection.Value = True Then
Application.ActiveSheet.Rows(cells).Hidden = False
TogBtnGameCollection.Caption = "-"
Else
Application.ActiveSheet.Rows(cells).Hidden = True
TogBtnGameCollection.Caption = "+"
End If
End Sub
****NOTE THIS IS THE FORMAT OF MY CHILD CATEGORIES*****
Private Sub TogBtnPlaystation3_Click()
Dim cells As String
cells = "52:57"
If TogBtnPlaystation3.Value = True Then
Application.ActiveSheet.Rows(cells).Hidden = False
TogBtnPlaystation3.Caption = "-"
Else
Application.ActiveSheet.Rows(cells).Hidden = True
TogBtnPlaystation3.Caption = "+"
End If
End Sub
As I said the sub categories all worked great until I put the one covering all of them. Is there a way to do this? If toggle Buttons Can't do it can something else?