Hi,
I'm not sure this is possible but thought it would be worth asking.
I have the following code below, which hides a tab based on a cell.
Ideally I'd like a macro button to say "Hide Tab" when it's unhidden and "Unhide Tab" when it's hidden.
Thanks for reading, any suggestions welcome.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
If [G2] = "Unhide" Then
Sheets("Sheet 1").Visible = True
Else
Sheets("Sheet 1").Visible = xlSheetVeryHidden
End If
Application.ScreenUpdating = True
End Sub
I'm not sure this is possible but thought it would be worth asking.
I have the following code below, which hides a tab based on a cell.
Ideally I'd like a macro button to say "Hide Tab" when it's unhidden and "Unhide Tab" when it's hidden.
Thanks for reading, any suggestions welcome.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
If [G2] = "Unhide" Then
Sheets("Sheet 1").Visible = True
Else
Sheets("Sheet 1").Visible = xlSheetVeryHidden
End If
Application.ScreenUpdating = True
End Sub