Gruppe
Allgemein
Problem
Der Blattschutz für einzelne oder alle Arbeitsblätter soll mit oder ohne Passwort gesetzt und aufgehoben werden.
StandardModule: Modul1
Sub ProtectA()
ActiveSheet.Protect
End Sub
Sub ProtectB()
ActiveSheet.Unprotect
End Sub
Sub ProtectC()
Dim wks As Worksheet
For Each wks In Worksheets
wks.Protect
Next wks
End Sub
Sub ProtectD()
Dim wks As Worksheet
For Each wks In Worksheets
ActiveSheet.Unprotect
Next wks
End Sub
Sub ProtectE()
ActiveSheet.Protect "HWH"
End Sub
Sub ProtectF()
ActiveSheet.Unprotect "HWH"
End Sub