Share via


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 命名空間