I have 20 sheets in the workbook and want to hide 19 of them with a click of a button.
Below code works but only hides the active sheet and not the other 18. Is there a better way to go about this?
Private Sub CommandButton1_Click()
With Sheets("Main Menu")
.Visible = True
.Activate
End With
Me.Visible = False
End Sub
Below code works but only hides the active sheet and not the other 18. Is there a better way to go about this?
Private Sub CommandButton1_Click()
With Sheets("Main Menu")
.Visible = True
.Activate
End With
Me.Visible = False
End Sub