wie kann in einer Zelle abfragen ob diese über einen Kommentar verfügt?
Dies möchte ich aber nicht mit einer OnError Anweisung machen.
Danke Euch schonmal.
VG
Steffen Schmerler
Sub Makro1()
Dim AnzCom As Long
Dim i As Long
With ActiveSheet.Comments
AnzCom = .Count
For i = 1 To AnzCom
If Not Intersect(Selection, .Item(i).Parent) Is Nothing Then Exit For
Next
End With
If i
gruß, DanielFunction testComment(myCell As Range) As Boolean
Dim myComment As Comment
If myCell.Cells.Count 1 Then Exit Function
For Each myComment In myCell.Parent.Comments
If myComment.Parent.Address = myCell.Address Then
testComment = True
Exit Function
End If
Next
End Function
Public Function No_Comment(myCell As Range) As Boolean
No_Comment = True
If Not myCell.Comment Is Nothing Then
MsgBox "Kommentar vorhanden": No_Comment = False
Else
MsgBox "Kein Kommentar"
End Function
Gruß Gerd