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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,915
Messages
6,122,217
Members
449,074
Latest member
cancansova

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