Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Row < 3 Or Target.Row > 73 Then Exit Sub 'limite de lignes de 3 à 73
Select Case Target.Column
Case 7, 9 'limite de colonnes 7 et 9 (G et I)
Application.EnableEvents = False
If Target.Comment Is Nothing Then Target.AddComment ' Création commentaire
Target.Comment.Text Text:=[mémo] & Chr(10) & Target.Comment.Text
Target.Comment.Shape.Height = 30
Target.Comment.Shape.Width = 30
Application.EnableEvents = True
End Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Row < 3 Or Target.Row > 73 Then Exit Sub'limite de lignes de 3 à 73
Select Case Target.Column
Case 7, 9 'limite de colonnes 7 et 9 (G et I)
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34) & Target.Value & Chr(34)
End Select
End Sub