Function AfficheCmt(cel, cond, msg, coul)
Application.Volatile
Dim mWidth, mHeight
Set f = Sheets(Application.Caller.Parent.Name)
If Not cel.Comment Is Nothing Then
mWidth = cel.Comment.Shape.Width ' mémoriser les dimensions
mHeight = cel.Comment.Shape.Height
cel.Comment.Delete
If cond Then
With cel
If .Comment Is Nothing Then .AddComment
.Comment.Shape.Width = mWidth ' restaurer les comments
.Comment.Shape.Height = mHeight
.Comment.Shape.Left = .Left + .Width + 5
.Comment.Shape.Top = .Top - 2
.Comment.Visible = True
tmp = CStr(msg)
.Comment.Text Text:=tmp
.Comment.Shape.Fill.ForeColor.SchemeColor = coul
.Comment.Visible = False
End With
End If
End If
AfficheCmt = ""
End Function