Macro for specific worksheets [Closed]

Report
Posts
1
Registration date
Monday July 3, 2017
Status
Member
Last seen
July 3, 2017
-
Hi,

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

Else

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!!

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!