XmlMappedRange.AddComment(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a comment to the XmlMappedRange control.
public Microsoft.Office.Interop.Excel.Comment AddComment (object Text);
abstract member AddComment : obj -> Microsoft.Office.Interop.Excel.Comment
Public Function AddComment (Optional Text As Object) As Comment
Parameters
- Text
- Object
The comment text.
Returns
The comment that was added to the XmlMappedRange control.
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 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
Remarks
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.