InsideHeight, InsideWidth Properties

Applies To

Frame control, Page object, UserForm object.

Description

InsideHeight returns the height, in points, of the client region inside a form. InsideWidth returns the width, in points, of the client region inside a form.

Syntax

object.InsideHeight

object.InsideWidth

The InsideHeight and InsideWidth property syntaxes have these parts:

Part

Description

object

Required. A valid object.


Remarks

The InsideHeight and InsideWidth properties are read-only. If the region includes a scroll bar, the returned value does not include the height or width of the scroll bar.

See Also

Height, Width properties.

Example

The following example uses the InsideHeight and InsideWidth properties to resize a CommandButton. The user clicks the CommandButton to resize it.

Note InsideHeight and InsideWidth are read-only properties.

To use this example, copy this sample code to the Declarations portion of a form. Make sure that the form contains:

  • A CommandButton named CommandButton1.
    Dim Resize As Single
    
    Private Sub UserForm_Initialize()
        Resize = 0.75
        CommandButton1.Caption = "Resize Button"
        
    End Sub
    
    Private Sub CommandButton1_Click()
        CommandButton1.Move 10, 10, UserForm1.InsideWidth * Resize, UserForm1 _
            .InsideHeight * Resize
        CommandButton1.Caption = "Button resized using InsideHeight and" _
            & " InsideWidth!"
    End Sub