Layered Toggle Buttons

ArmysBest

New Member
Joined
Mar 20, 2020
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
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?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Unless there is a particular reason not to, why not use the Group function in Excel?
1128177.gif

...with settings:
1584814336702.png
>
1584814357524.png
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

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