다음을 통해 공유


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.", missing, missing);

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

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

XmlMappedRange 인터페이스

Microsoft.Office.Tools.Excel 네임스페이스