NamedRange.Height (Propiedad)
Obtiene el alto del control NamedRange.
Espacio de nombres: Microsoft.Office.Tools.Excel
Ensamblado: Microsoft.Office.Tools.Excel (en Microsoft.Office.Tools.Excel.dll)
Sintaxis
'Declaración
ReadOnly Property Height As Object
Get
Object Height { get; }
Valor de propiedad
Tipo: System.Object
Alto del control NamedRange.
Ejemplos
En el ejemplo de código siguiente se crea NamedRange y, a continuación, se utilizan las propiedades Width y Height para mostrar el ancho y alto de NamedRange.
Se trata de un ejemplo para una personalización en el nivel del documento.
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.");
}
Seguridad de .NET Framework
- Plena confianza para el llamador inmediato. Un código de confianza parcial no puede utilizar este miembro. Para obtener más información, vea Utilizar bibliotecas de código que no es de plena confianza.