Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Comment Is Nothing Then
Target.AddComment ' Création commentaire
Target.Comment.Text Text:="Blabla" & Chr(10)
Target.Comment.Shape.OLEFormat.Object.Font.Name = "Tverdana"
Target.Comment.Shape.OLEFormat.Object.Font.Size = 7
Target.Comment.Shape.OLEFormat.Object.Font.FontStyle = "Normal"
SendKeys "+{F2}"
Cancel = True
End If
End Sub
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
If Target.Comment Is Nothing Then
Target.AddComment
Target.Comment.Text Text:="Blabla....." & Chr(10)
lg = Len(Target.Comment.Text)
With Target.Comment.Shape.TextFrame
.Characters(Start:=1, Length:=lg).Font.Name = "Verdana"
End With
SendKeys "m"
Else
SendKeys "m"
End If
End Sub