if range("A1").hascomment = True then
Code...
endif
Does anyone know a turn around ?
Many thx.
Sam.
samue...@wanadoo.fr
http://perso.wanadoo.fr/sam.marie
Function HasComment(Target As Range) As Boolean
On Error Resume Next
Dim txt As String
txt = Target.Comment.Text
HasComment = Err.Number = 0
Err.Clear
End Function
then in your code
If HasComment(Ranhe("A1") then
...code
--
Patrick Molloy
Microsoft Excel MVP
"samuelmarin" <samue...@wanadoo.fr> wrote in message
news:9t5c6a$1hf$1...@wanadoo.fr...
You can check if a cell contains a comment as follows :
Sub HasComment()
If Not Range("A1").NoteText = "" Then
Code ...
End If
End Sub
Regards
Eddy
"samuelmarin" <samue...@wanadoo.fr> schreef in bericht
news:9t5c6a$1hf$1...@wanadoo.fr...