Thread: HasComment?
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Örjan Skoglösa Örjan Skoglösa is offline
external usenet poster
 
Posts: 4
Default HasComment?

Hi,

(My first posting to this group.)

I want to examine the text of a cell comment but if I use a clause
like
If myCell.Comment.Text = "xyz"
on a cell without a comment, I get an error message.

I guess I could iterate through all comments in a specific range with
For Each myComment In Range.Cells.Comments
but as I already for other purposes am iterating through the cells in
this range, It would be easier if I simply could check for the
existence of any comment in the active cell.

Is there a possibility to find out whether a cell has a comment or
not?

TIA

Örjan Skoglösa