Option Explicit
Sub Commentaire_personnaliser()
On Error Resume Next
Dim MyCmt As Comment
For Each MyCmt In ActiveSheet.Comments
MyCmt.Shape.OLEFormat.Object.AutoSize = True
With MyCmt.Shape.OLEFormat.Object.Font
.Name = "Arial"
.Size = 30
.ColorIndex = 2
.Bold = False
End With
With MyCmt.Shape
.OLEFormat.Object.ShapeRange.Fill.ForeColor.SchemeColor = 2
.OLEFormat.Object.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
.OLEFormat.Object.ShapeRange.Fill.ForeColor.SchemeColor = 10
.AutoShapeType = msoShapeRoundedRectangle
End With
Next MyCmt
Call MsgBox(" La mise en forme s'est déroulée avec succès ", vbInformation Or vbDefaultButton1, "MEF Commentaire")
End Sub