XmlMappedRange.ClearNotes 方法

XmlMappedRange 控件中清除说明和声音说明。

命名空间:  Microsoft.Office.Tools.Excel
程序集:  Microsoft.Office.Tools.Excel(在 Microsoft.Office.Tools.Excel.dll 中)

语法

声明
Function ClearNotes As Object
Object ClearNotes()

返回值

类型:System.Object

示例

下面的代码示例使用 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.");

    if (MessageBox.Show("Remove the note?", "Test",
        MessageBoxButtons.YesNo) == DialogResult.Yes)
    {
        this.CustomerLastNameCell.ClearNotes();
    }
}

.NET Framework 安全性

请参见

参考

XmlMappedRange 接口

Microsoft.Office.Tools.Excel 命名空间