Martin_H
Board Regular
- Joined
- Aug 26, 2020
- Messages
- 190
- Office Version
- 365
- Platform
- Windows
Hi,
would it be possible to simplify & speed up this code?
Thank you.
would it be possible to simplify & speed up this code?
Thank you.
VBA Code:
Sub HIDE_ALL()
With ThisWorkbook
.Unprotect password:="1111"
If Worksheets("WB_1").Visible = True Then
Worksheets("WB_1").Visible = False
End If
If Worksheets("WB_2").Visible = True Then
Worksheets("WB_2").Visible = False
End If
If Worksheets("WB_3").Visible = True Then
Worksheets("WB_3").Visible = False
End If
If Worksheets("WB_4").Visible = True Then
Worksheets("WB_4").Visible = False
End If
If Worksheets("WB_5").Visible = True Then
Worksheets("WB_5").Visible = False
End If
If Worksheets("WB_6").Visible = True Then
Worksheets("WB_6").Visible = False
End If
If Worksheets("WB_7").Visible = True Then
Worksheets("WB_7").Visible = False
End If
.protect password:="1111"
End With
End Sub