Macro for specific worksheets

Elise_123 Posts 1 Registration date Monday July 3, 2017 Status Member Last seen July 3, 2017 - Jul 3, 2017 at 04:50 AM

I would like to hide and unhide specific rows by one toggle button in multiple worksheets.
Could someone help me with specifiyng the macro? I managed to create a macro for hide/unhide only at the current sheet. Please see below:

Private Sub ToggleButton1_Click()

If ToggleButton1.Value = True Then

Rows(11).EntireRow.Hidden = False
Rows(13).EntireRow.Hidden = False


Rows(11).EntireRow.Hidden = True
Rows(13).EntireRow.Hidden = True

End If

End Sub

So, I would like to do this for different rows in different worksheets by one click.

I look forward to receiving an answer!!