NativeExcel for .Net Developer's Reference

IComment.Text Property

Gets or sets the text of the comment.

[Visual Basic]
Property Text As String
[C#]
string Text { get; set; }
[C++]
__property String* get_Text();
__property void set_Text(String* );
[JScript]
function get Text() : String
function set Text(String);

Property Value

A string containing the text of the comment.

Example

This example sets the comment for cell E5 to be always visible.

[C#]
book.Worksheets[1].Range["E5"].AddComment().Text = "new text";
[Visual Basic]
book.Worksheets(1).Range("E5").AddComment().Text = "new text"
[C++]
book->Worksheets->Item[1]->Range->Item[S"E5"]->AddComment()->Text = S"new text";

See Also

IComment Interface | NativeExcel Namespace