Sub proteger()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ws.EnableSelection = xlUnlockedCells
Next
End Sub
Sub deproteger()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Unprotect
Next
End Sub
Sub protegerB()
Dim ws As Worksheet
For Each ws In Worksheets
Select Case ws.Name
Case "CHAMPIONNAT", "SAISON"
ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, _
AllowFiltering:=True, AllowUsingPivotTables:=True
ws.EnableSelection = 1
Case Else
ws.Unprotect
End Select
Next
End Sub
Sub Proteger()
On Error Resume Next
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("SAISON").Protect UserInterFaceOnly:=True
Sheets("CHAMPIONNANT").Protect UserInterFaceOnly:=True
End Sub
Public Sub Deproteger()
'On Error Resume Next
Application.ScreenUpdating = False
'enlever protection feuilles
Sheets("SAISON").Select
ActiveSheet.Unprotect ("EQUIPES")
Sheets("CHAMPIONNANT").Select
ActiveSheet.Unprotect ("EQUIPES")
End Sub