Right now I have 2 control buttons, one is to hide all sheets except for active one and the other is to unhide all sheets. I would like to make that just one button that changes text so it will do both. Not sure how to go about that. My code is below. Any help would be most appreciated. Thank you.
VBA Code:
Sub Hide()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetHidden
Next ws
End Sub
Sub UnHide()
Dim ws As Worksheet
Set AC = ThisWorkbook.ActiveSheet
Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetVisible
Next ws
AC.Select
End Sub