다음을 통해 공유


XmlMappedRange.AddComment 메서드

XmlMappedRange 컨트롤에 주석을 추가합니다.

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

구문

‘선언
Function AddComment ( _
    Text As Object _
) As Comment
Comment AddComment(
    Object Text
)

매개 변수

반환 값

형식: Microsoft.Office.Interop.Excel.Comment
XmlMappedRange 컨트롤에 추가된 주석입니다.

설명

선택적 매개 변수

선택적 매개 변수에 대한 자세한 내용은 Office 솔루션의 선택적 매개 변수를 참조하십시오.

예제

다음 코드 예제에서는 AddComment 메서드를 사용하여 CustomerLastNameCell이라는 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 네임스페이스