Private Sub Workbook_Open()
Dim Sh As Object
For Each Sh In Me.Sheets
Sh.Protect Monpass, UserInterfaceOnly:=True 'voir Monpass dans Module1
Next
Me.Saved = True 'évite l'invite à la fermeture si aucune modification
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim r As Range
Application.EnableEvents = False
On Error Resume Next
Set Target = Intersect(Target, Sh.UsedRange) 'limitation
'---interdit les entrées multiples si une cellule non vide a une validation de données---
If Target.Count > 1 Then
Set r = Target.SpecialCells(xlCellTypeAllValidation)
If Not r Is Nothing Then
Set r = r.Find("*", , xlValues)
If Not r Is Nothing Then Application.Undo: GoTo 1
End If
End If
'---permet d'agrandir un ou plusieurs tableaux simultanément---
For Each r In Target.Areas
r = r.Value
Next
1 Application.EnableEvents = True
End Sub