Partilhar via


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

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace