Hello,
You can try the following:
Function CheckComment(CC As Range) As Boolean
Dim Com As Comment
' trap error
'
On Error Resume Next
'
' try to get comment if any
'
Set Com = CC.Comment
'
' Restore error management
'
On Error GoTo 0
'
' Check if comment
'
If Com Is Nothing Then
CheckComment = False
Else
CheckComment = True
End If
End Function
Hope this will help.
Regards.
Patdil
|