XmlMappedRange.AddComment Method (2007 System)

Adds a comment to the XmlMappedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
Public Function AddComment ( _
    Text As Object _
) As Comment
'Usage
Dim instance As XmlMappedRange 
Dim Text As Object 
Dim returnValue As Comment 

returnValue = instance.AddComment(Text)
public Comment AddComment(
    Object Text
)
public:
Comment^ AddComment(
    Object^ Text
)
public function AddComment(
    Text : Object
) : Comment

Parameters

Return Value

Type: Comment
The comment that was added to the XmlMappedRange control.

Remarks

Optional Parameters

For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.

Examples

The following code example uses the AddComment method to add a comment to an XmlMappedRange named CustomerLastNameCell, 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

See Also

Reference

XmlMappedRange Class

XmlMappedRange Members

Microsoft.Office.Tools.Excel Namespace