XmlMappedRange.AddComment Method
Adds a comment to the XmlMappedRange control.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Function AddComment ( _
Text As Object _
) As Comment
Comment AddComment(
Object Text
)
Parameters
Text
Type: System.ObjectThe comment text.
Return Value
Type: Comment
The comment that was added to the XmlMappedRange control.
Remarks
Optional Parameters
For information on optional parameters, see 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
- 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.