Private Sub Workbook_Open()
Dim rng As Range
With Sheets("Tabelle1") 'Tabellenname - Anpassen!
.Unprotect strPW
.Cells.Locked = False
On Error Resume Next
Set rng = .Cells.SpecialCells(xlCellTypeConstants)
If Not rng Is Nothing Then rng.Locked = True
Set rng = .Cells.SpecialCells(xlCellTypeFormulas)
If Not rng Is Nothing Then rng.Locked = True
Err.Clear
On Error GoTo 0
.Protect strPW
End With
End Sub