Udostępnij za pośrednictwem


NamedRange.Height Property (2007 System)

Gets the height of the NamedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Height As Object
'Usage
Dim instance As NamedRange 
Dim value As Object 

value = instance.Height
[BrowsableAttribute(false)]
public Object Height { get; }
[BrowsableAttribute(false)]
public:
property Object^ Height {
    Object^ get ();
}
public function get Height () : Object

Property Value

Type: System.Object
The height of the NamedRange control.

Examples

The following code example creates a NamedRange and then uses the Width and Height properties to display the width and height of the NamedRange.

This example is for a document-level customization.

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 Security

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace