Function ThereIsCommentInCell(pColumn&, pRow&) As Boolean
ThereIsCommentInCell = True
Dim oAnnotation As Variant
oAnnotation = ThisComponent.CurrentController.ActiveSheet.getCellByPosition(pColumn, pRow).getAnnotation()
If oAnnotation.getString() = "" Then
ThereIsCommentInCell = False
End If
End Function
Sub Test
MsgBox "ThereIsCommentInCell(0, 0) = " & ThereIsCommentInCell(0, 0),,"Function"
MsgBox "ThereIsCommentInCell(0, 1) = " & ThereIsCommentInCell(0, 1),,"Function"
End Sub
Is there any better way to check the comment instead of checking the content of comment as I did ?