Hi
Waarom geeft de code wel commentaar terug als ik een cel zonder commentaar selecteer?
Waarom geeft de code wel commentaar terug als ik een cel zonder commentaar selecteer?
Code:
Sub FindComments()
Dim rngComments As Range
Set rngComments = Selection
On Error Resume Next
' Set rngComments = rngComments.SpecialCells(xlCellTypeComments)
On Error GoTo 0
If rngComments Is Nothing Then
MsgBox "heeft geen commentaar"
Else
MsgBox "heeft wel commentaar"
End If
End Sub