Layered Toggle Buttons

Status
Not open for further replies.

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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Duplicate to Layered Toggle Buttons

Please do not post the same question multiple times. Questions of a duplicate nature will be locked or deleted, per #12 of the Forum Rules and points 6 & 7 of the Guidelines.

Any bumps, clarifications, or follow-ups should be posted to the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,830
Messages
6,121,835
Members
449,051
Latest member
excelquestion515

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