Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If [COLOR="Blue"]Target.Column > 9 And Target.Column < 41[/COLOR] And Target.Count = 1 Then [COLOR="Green"]' colonne 10 (J) à la colonne 40 (AN)[/COLOR]
If Target.NoteText = "" Then Target.AddComment [COLOR="Green"]' Création commentaire[/COLOR]
Target.Comment.Text Text:=Target.Comment.Text & _
Format(Target.Value, [COLOR="Red"][I]"[h]:mm"[/I][/COLOR]) & " Modifié par:" & Environ("UserName") & _
" Le " & Now & vbLf
Target.Comment.Shape.TextFrame.AutoSize = True
End If
Application.EnableEvents = True
End Sub