Hi all,

Thanks to this forum I managed to name sheets within a range (between the sheets "Start" and "End") yesterday.

Now I'm trying to hide/unhide the same sheet range with a button, using below code, but it doesn't work.

Sub sbHideASheet()

Dim i As Long
   
   For i = Sheets("Start").Index + 1 To Sheets("End").Index - 1
      With Sheets(i)
        Sheet2.Visible = False
        Sheets("Sheet2").Visible = True
      End With
   Next i
End Sub
Any idea how to correct this?

In a dream world it would be activated by a button where you simply click either choice, something like this [ O Hide O Unhide ]

Many thanks in advance.