NamedRange.Comment Özellik
Alır bir Comment temsil eden üst sol köşesindeki hücre ile ilgili yorum NamedRange Denetim.
Ad alanı: Microsoft.Office.Tools.Excel
Derleme: Microsoft.Office.Tools.Excel (Microsoft.Office.Tools.Excel.dll içinde)
Sözdizimi
'Bildirim
ReadOnly Property Comment As Comment
Get
Comment Comment { get; }
Özellik Değeri
Tür: Microsoft.Office.Interop.Excel.Comment
A Comment temsil eden üst sol köşesindeki hücre ile ilgili yorum NamedRange Denetim.
Örnekler
Aşağıdaki kod örneği oluşturur bir NamedRange ve hücre. açıklama ekler Sonra yorum kullanıcı tıklattığında görünür olmasına neden olan bir ileti kutusu görüntüler Tamam.
Bu örnek, bir belge düzeyinde özelleştirme için bulunur.
Private commentRange As Microsoft.Office.Tools.Excel.NamedRange
Private Sub AddCommentToRange()
commentRange = Me.Controls.AddNamedRange( _
Me.Range("C3"), "setColumnRowRange")
Me.commentRange.AddComment("This is a comment.")
Dim comment1 As Excel.Comment = Me.commentRange.Comment
comment1.Visible = False
If MessageBox.Show("Display comment?", "Comment Test", _
MessageBoxButtons.OKCancel) = DialogResult.OK Then
comment1.Visible = True
End If
End Sub
Microsoft.Office.Tools.Excel.NamedRange commentRange;
private void AddCommentToRange()
{
commentRange = this.Controls.AddNamedRange(
this.Range["C3", missing], "setColumnRowRange");
this.commentRange.AddComment("This is a comment.");
Excel.Comment comment1 = this.commentRange.Comment;
comment1.Visible = false;
if (MessageBox.Show("Display comment?", "Comment Test",
MessageBoxButtons.OKCancel) == DialogResult.OK)
{
comment1.Visible = true;
}
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. kısmen güvenilir kod tarafından Kitaplıklar kullanma.