NativeExcel2 for .Net Developer's Reference

IComment.Text Property

Gets or sets the text of the comment.

[Visual Basic]
PropertyTextAsString
[C#]
stringText{get;set;}
[C++]
__propertyString*get_Text();
__propertyvoidset_Text(String*);
[JScript]
functiongetText():String
functionsetText(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";
[VisualBasic]
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