从 XmlMappedRange 控件中清除说明和声音说明。
命名空间:  Microsoft.Office.Tools.Excel
程序集:  Microsoft.Office.Tools.Excel(在 Microsoft.Office.Tools.Excel.dll 中)
语法
声明
Function ClearNotes As Object
Object ClearNotes()
返回值
示例
下面的代码示例使用 NoteText 方法向 XmlMappedRange 添加一个说明,然后提示用户使用 ClearNotes 方法移除该说明。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange。
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.", missing, missing);
    if (MessageBox.Show("Remove the note?", "Test",
        MessageBoxButtons.YesNo) == DialogResult.Yes)
    {
        this.CustomerLastNameCell.ClearNotes();
    }
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。