XmlMappedRange.Comment Property
Gets a Comment that represents the comment associated with the cell in the upper-left corner of the XmlMappedRange control.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
ReadOnly Property Comment As Comment
Get
Comment Comment { get; }
Property Value
Type: Microsoft.Office.Interop.Excel.Comment
A Comment that represents the comment associated with the cell in the upper-left corner of the XmlMappedRange control.
Examples
The following code example uses the AddComment method to add a comment to an XmlMappedRange, and then uses the Comment property to alter the comment text. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.
Private Sub AddComment()
Me.CustomerLastNameCell.AddComment("Text to be replaced.")
Me.CustomerLastNameCell.Comment.Text( _
"This range contains customer last names.")
End Sub
private void AddComment()
{
this.CustomerLastNameCell.AddComment("Text to be replaced.");
this.CustomerLastNameCell.Comment.Text(
"This range contains customer last names.",
missing, missing);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.