The initial position of the form is defined by the StartUpPosition property. Valid values are listed in the table below.
StartUpPosition Property Values
| Value | Description |
|---|---|
| 0 | The coordinates of the top-left corner of the form are set using the Top and Left properties |
| 1 | Center of the application window |
| 2 | Centered on the screen |
| 3 | Top-left corner of the screen |
For example, the following code sets the form so that its top-left corner is at the point (100, 100):
Private Sub UserForm_Initialize()
Me.StartUpPosition = 0
Me.Top = 100
Me.Left = 100
End Sub