XmlMappedRange.ClearNotes Method

Definition

Clears notes and sound notes from the XmlMappedRange control.

public:
 System::Object ^ ClearNotes();
public object ClearNotes ();
abstract member ClearNotes : unit -> obj
Public Function ClearNotes () As Object

Returns

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 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();
    }
}
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

Applies to