muss mal einen Hilfeschrei loslassen.
Mit diesem Makro schütze ich alle Arbeitsblätter beim Öffnen meiner Datei. Nun brauch ich aber einen Button wie ich das wieder aufheben kann. ICh bekomme das nichthin und kann nichts mehr in meiner Datei ändern.
MfG René
Private Sub Workbook_Open()
Application.ScreenUpdating = False
Application.DisplayFullScreen = True
ActiveWindow.DisplayHeadings = False
Application.CutCopyMode = False
Dim objWs As Worksheet
Dim rngLock As Range
On Error Resume Next
For Each objWs In ThisWorkbook.Worksheets
With objWs
.Unprotect ""
Set rngLock = .UsedRange.SpecialCells(xlCellTypeConstants)
If Not rngLock Is Nothing Then rngLock.Locked = True
Set rngLock = .UsedRange.SpecialCells(xlCellTypeFormulas)
If Not rngLock Is Nothing Then rngLock.Locked = True
.Protect ""
End With
Set rngLock = Nothing
Next
Application.ScreenUpdating = True
On Error GoTo 0
End Sub