Returns or sets a value specifying the position of an object when it first appears.
object.StartUpPosition = position
The parts of the StartUpPosition property syntax are described in the following table.
Part | Description |
---|---|
object | An object expression that evaluates to an object. |
StartUpPosition | An integer that specifies the position of the object, as shown in Settings. |
For the StartUpPosition, use one of the four settings described in the following table.
Constant | Value | Description |
---|---|---|
vbStartUpManual | 0 | No initial setting specified. |
vbStartUpOwner | 1 | Center on the item to which the UserForm belongs. |
vbStartUpScreen | 2 | Center on the whole screen. |
vbStartUpWindowsDefault | 3 | Position in upper-left corner of screen. |
You can set the StartUpPosition property programmatically or from the property window.