Clearing Comments
The help files for the Comments Collection Object (found by pressing F1 on
the word "Comments") offers this code example...
Use the Comments property to return the Comments collection. The following
example hides all the comments on worksheet one.
Set cmt = Worksheets(1).Comments
For Each c In cmt
c.Visible = False
Next
--
Rick (MVP - Excel)
"kirkm" wrote in message ...
I'm using this code in a function and sending in the
line number as 'p' -
--
With Range("O" & Val(p))
If Not .Comment Is Nothing Then
With .Comment
.Visible = False
End With
End If
End With
--
It is feasible to use the highest line number insted of p
avoiding the need to calcualte p - or might that be
significantly slower?
Perhaps there's a better method to globally hide
any/all comments ?
Thanks - Kirk
|