Aracılığıyla paylaş


NamedRange.Width Özellik

Genişliğini alır NamedRange denetim noktaları.

Ad alanı:  Microsoft.Office.Tools.Excel
Derleme:  Microsoft.Office.Tools.Excel (Microsoft.Office.Tools.Excel.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property Width As Object
    Get
Object Width { get; }

Özellik Değeri

Tür: System.Object
Genişliğini NamedRange denetim noktaları.

Örnekler

Aşağıdaki kod örneği oluşturur bir NamedRange ve sonra Width ve Height genişliğini ve yüksekliğini görüntülemesini özellikleri NamedRange.

Bu örnek, bir belge düzeyinde özelleştirme için bulunur.

Private heightWidthRange As Microsoft.Office.Tools.Excel.NamedRange

Private Sub DisplayHeightAndWidth()
    heightWidthRange = Me.Controls.AddNamedRange( _
        Me.Range("B4"), "heightWidthRange")
    heightWidthRange.Select()
    MessageBox.Show("The NamedRange control is " & _
        Me.heightWidthRange.Width & " points wide and " & _
        Me.heightWidthRange.Height & " points high.")
End Sub
Microsoft.Office.Tools.Excel.NamedRange heightWidthRange;
private void DisplayHeightAndWidth()
{
    heightWidthRange = this.Controls.AddNamedRange(
        this.Range["B4", missing], "heightWidthRange");
    heightWidthRange.Select();
    MessageBox.Show("The NamedRange control is " +
    this.heightWidthRange.Width + " points wide and " +
    this.heightWidthRange.Height + " points high.");
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

NamedRange Arabirim

Microsoft.Office.Tools.Excel Ad Alanı