Hä, was ist jetzt passiert, so muss es heißen!
Private Sub Workbook_Open()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
Select Case wks.CodeName
Case "Tabelle1" , "Tabelle2", "Sheet1", "Sheet2"
Case Else
wks.Protect userinterfaceonly:= True , Password:= "1907"
wks.EnableOutlining = True
End Select
Next
End Sub
|