Dim oldCell As Range
Sub remasterOldCell()
If Not oldCell Is Nothing Then
With oldCell.Comment.Shape
.OLEFormat.Object.Font.Size = 8
.OLEFormat.Object.Font.Color = RGB(127, 127, 127)
.OLEFormat.Object.Font.Bold = False
.OLEFormat.Object.Font.Italic = True
.OLEFormat.Object.Font.Name = "calibri"
.TextFrame.AutoSize = False
End With
End If
End Sub
Sub MEF_Commentaire_2(MaCellule As Range)
If MaCellule.Comment Is Nothing Then Exit Sub
remasterOldCell
MaCellule.Offset(1).Select
montexte = MaCellule.Comment.Text
AuteurNbCar = InStr(1, montexte, ":" & Chr(10)) + 1
'on passe par l'object .oleformat.object pour remttre tout en normal c'est plus simple
With MaCellule.Comment.Shape
.OLEFormat.Object.Font.Size = 8
.OLEFormat.Object.Font.Color = RGB(127, 127, 127)
.OLEFormat.Object.Font.Bold = False
.OLEFormat.Object.Font.Italic = False
.OLEFormat.Object.Font.Name = "calibri"
With .TextFrame.Characters(Start:=AuteurNbCar, Length:=200).Font
.Color = RGB(0, 0, 255) '!!!!!!!!! TOUJOUR MODIFIER LA COULEUR AVANT LE SIZE!!!!!!!!!!
.Size = 10
.Bold = True
.Italic = False
.Name = "broadway"
End With
.AutoShapeType = msoShapeRoundedRectangle
.TextFrame.AutoSize = True
.Fill.ForeColor.RGB = RGB(255, 255, 150)
Set oldCell = MaCellule
End With