Bonjour Jean-Eric,
Je te remercie pour le fichier modifié, j'ai modifié 2/3 trucs sur le code que tu m'as transmi.
Concernant la note maximal, je n'est pas besoin d'y appliqué une règle.
Je suis débutant voir même plus que débutant, mais ce que je voulais rajouter fonctionne.
Je te laisse jeter un coup d'oeil si tu as le temps
' module de grille d'insalubrité
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As range, Cancel As Boolean)
Dim x As Double, y As Double
If Not Intersect(Target, range("B:E")) Is Nothing And Target.Count = 1 Then
Cancel = True
x = Choose(Target.Column, 0, 0, 1, 2, 3)
y = IIf(IsEmpty(Me.Cells(Target.Row, 10)), 1, x * Me.Cells(Target.Row, 10))
With Me.Cells(Target.Row, 2).Resize(1, 4).Font
.Bold = False
.ColorIndex = xlAutomatic
.Strikethrough = False
End With
With Me.Cells(Target.Row, 2).Resize(1, 4).Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 16777215
End With
With Target.Font
.Bold = True
.Color = -16776961
.Strikethrough = False
End With
With Target.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 9868950
End With
Me.Cells(Target.Row, 11) = y
End If
End Sub
&
' Module standard
Public Sub RAZ()
Dim n As Long
If MsgBox("Etes-vous certain de vouloir réinitialiser le contenu des cellules ?", vbYesNo, "Demande de confirmation") = vbYes Then
range("ma_plage").Value = 0
range("mes_commentaires").ClearContents
MsgBox "Le contenu des cellules a été réinitialisé !"
With ActiveSheet
n = .Cells(.Rows.Count, 2).End(xlUp).Row
With .Cells(5, 2).Resize(n - 4, 5)
.Font.Bold = False
.Font.ColorIndex = xlAutomatic
.Font.Strikethrough = False
.Interior.Pattern = xlSolid
.Interior.PatternColorIndex = xlAutomatic
.Interior.Color = 16777215
End With
End With
End If
End Sub
Cordialement,
Morgan2835