NativeExcel2 for .Net Developer's Reference

IComment Interface

Represents a cell comment.

For a list of all members of this type, see IComment Members.

[Visual Basic]
PublicInterfaceIComment
[C#]
publicinterfaceIComment
[C++]
public__gc__interfaceIComment
[JScript]
publicinterfaceIComment

Remarks

Use the Comment property to return an IComment interface. The following example changes the text in the comment in cell E5.

[C#]
book.Worksheets[1].Range["E5"].Comment.Text = "Comment";
Use the AddComment method to add a comment to a range. The following example adds a comment to cell E5 on worksheet one.
[C#]
IComment comment = book.Worksheets[1].Range["E5"].AddComment();
comment.Visible = false;
comment.Text = "Comment text"; 

Requirements

Namespace: NativeExcel

Assembly: NativeExcel (in NativeExcel.dll)

See Also

IComment Members | NativeExcel Namespace | IRange.Comment Property | IRange.ClearComments Method | IRange.AddComment Method