OVH Cloud OVH Cloud

Test commentaire

2 réponses
Avatar
Fredo P.
Bonjour
Est il possible de tester la présence de commentaire sur une cellule et
comment.

--
Fréd. Ponsinet

2 réponses

Avatar
MichD
Bonjour,

'-----------------------------------------
Sub test()
Dim Cmt As Comment

With Range("b1")
Set Cmt = .Comment
If Not Cmt Is Nothing Then
MsgBox Cmt.Text
Else
MsgBox "pas de commentaire dans cette cellule " & .Address
End If
End With
End Sub
'-----------------------------------------
Avatar
Fredo P.
Merci M Denis
En + on me l'a (il me semble ) déjà soufflé, faut pas vieillir!
"MichD" a écrit dans le message de news:
mfukhv$16m$
Bonjour,

'-----------------------------------------
Sub test()
Dim Cmt As Comment

With Range("b1")
Set Cmt = .Comment
If Not Cmt Is Nothing Then
MsgBox Cmt.Text
Else
MsgBox "pas de commentaire dans cette cellule " & .Address
End If
End With
End Sub
'-----------------------------------------