Compartilhar via


XmlMappedRange.Comment Property

Definition

Gets a Comment that represents the comment associated with the cell in the upper-left corner of the XmlMappedRange control.

public:
 property Microsoft::Office::Interop::Excel::Comment ^ Comment { Microsoft::Office::Interop::Excel::Comment ^ get(); };
public Microsoft.Office.Interop.Excel.Comment Comment { get; }
member this.Comment : Microsoft.Office.Interop.Excel.Comment
Public ReadOnly Property Comment As Comment

Property Value

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 void AddComment()
{
    this.CustomerLastNameCell.AddComment("Text to be replaced.");
    this.CustomerLastNameCell.Comment.Text(
        "This range contains customer last names.", 
        missing, missing);
}
Private Sub AddComment()
    Me.CustomerLastNameCell.AddComment("Text to be replaced.")
    Me.CustomerLastNameCell.Comment.Text( _
        "This range contains customer last names.")
End Sub

Applies to