Subject: Check comment or not
Posted By: Tachyophan Post Date: 12/27/2003 2:13:56 PM
Hello all,
Is there a way to check if there is a comment or not set on a cell?
I tried several ways but there were unsuccessful.
Many Thanx
Stéphane
Reply By: patdil Reply Date: 1/9/2004 5:20:39 PM
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


Go to topic 8386

Return to index page 972
Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967
Return to index page 966
Return to index page 965
Return to index page 964
Return to index page 963