Strange worksheet protection behavior
Hi Patrick,
Replace the suggested code with:
'=============
Private Sub Workbook_Open()
Dim SH As Worksheet
Const PWORD As String = "ABC" '<<=== CHANGE
For Each SH In Me.Worksheets
With SH
.Unprotect password:=PWORD
.EnableSelection = xlUnlockedCells
.Protect password:=PWORD, _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True
End With
Next SH
End Sub
'<<=============
---
Regards,
Norman
|