다음을 통해 공유


XmlMappedRange.Comment 속성

XmlMappedRange 컨트롤의 왼쪽 위 모퉁이에 있는 셀과 관련된 주석을 나타내는 Comment를 가져옵니다.

네임스페이스:  Microsoft.Office.Tools.Excel
어셈블리:  Microsoft.Office.Tools.Excel(Microsoft.Office.Tools.Excel.dll)

구문

‘선언
ReadOnly Property Comment As Comment
    Get
Comment Comment { get; }

속성 값

형식: Microsoft.Office.Interop.Excel.Comment
XmlMappedRange 컨트롤의 왼쪽 위 모퉁이에 있는 셀과 관련된 주석을 나타내는 Comment입니다.

예제

다음 코드 예제에서는 AddComment 메서드를 사용하여 XmlMappedRange에 주석을 추가한 다음 Comment 속성을 사용하여 주석 텍스트를 변경합니다. 이 코드 예제에서는 현재 워크시트에 CustomerLastNameCell이라는 XmlMappedRange가 포함되어 있다고 가정합니다.

Private Sub AddComment()
    Me.CustomerLastNameCell.AddComment("Text to be replaced.")
    Me.CustomerLastNameCell.Comment.Text( _
        "This range contains customer last names.")
End Sub
private void AddComment()
{
    this.CustomerLastNameCell.AddComment("Text to be replaced.");
    this.CustomerLastNameCell.Comment.Text(
        "This range contains customer last names.", 
        missing, missing);
}

.NET Framework 보안

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

참고 항목

참조

XmlMappedRange 인터페이스

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