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
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 Width ve Height genişliğini ve yüksekliğini görüntülemesini özellikleri NamedRange.
Bu örnek için belge düzeyi özelleştirmesinde içindir.
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"], "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
- 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üvenilen kod kitaplıklarını kullanma.