XmlMappedRange.ClearNotes Method
Clears notes and sound notes from the XmlMappedRange control.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Function ClearNotes As Object
Object ClearNotes()
Return Value
Type: System.Object
Examples
The following code example uses the NoteText method to add a note to an XmlMappedRange, and then prompts the user to remove the note by using the ClearNotes method. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.
Private Sub SetNote()
Me.CustomerLastNameCell.NoteText("This cell contains customer " & _
"last names.")
If MessageBox.Show("Remove the note?", "Test", MessageBoxButtons.YesNo) = _
DialogResult.Yes Then
Me.CustomerLastNameCell.ClearNotes()
End If
End Sub
private void SetNote()
{
this.CustomerLastNameCell.NoteText("This cell contains customer " +
"last names.");
if (MessageBox.Show("Remove the note?", "Test",
MessageBoxButtons.YesNo) == DialogResult.Yes)
{
this.CustomerLastNameCell.ClearNotes();
}
}
.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.