Hi everyone, i have a toggle to hide/unhide sheets, but sometimes those sheets are not in the worksheet and the user will not know it. Would anyone be able to help me mod this script to incorporate an if statement the will throw up a message box alerting the user?
Thanks a ton in advance heres the code:
Thanks a ton in advance heres the code:
Code:
Private Sub ToggleButton1_Click()
'Toggles the To Do List sheet as hidden and unhidden
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In Worksheets(Array("Week 1", "Week 2", "Week 3", "Week 4", "Week 5"))
ws.Visible = Not ws.Visible
Next ws
Application.ScreenUpdating = True
End Sub