Famille de feuilles de calcul Microsoft avec des outils pour l’analyse, le graphique et la communication des données.
Bonjour,
Essaie cette macro.
La macro supprime les commentaires vides.
�??-----------------------------------------------------
Sub test()
Dim C As Comment, Texte As String
Dim L As Integer, W As Long, X As String
For Each C In Feuil1.Comments
Texte = C.Text
L = Len(Texte)
If L > 0 Then
W = (Application.Ceiling(L / 50,
-
-
- * 12
-
Texte = Replace(Texte, vbCrLf, " ")
Texte = Replace(Texte, Chr(10), " ")
Texte = Replace(Texte, Chr(13), " ")
X = C.Parent.Address
C.Delete
Set C Range(X).AddComment
With C.Shape
.Height = W
.Width 210
.OLEFormat.Object.Text = Texte
.TextFrame.HorizontalAlignment = xlHAlignCenter
.TextFrame.VerticalAlignment = xlVAlignCenter
.TextFrame.AutoSize = False
End With
Else
C.Delete
End If
Next
End Sub
�??-----------------------------------------------------