Open userform at top of form

  • Thread starter Thread starter RJQMAN
  • Start date Start date
R

RJQMAN

I have a long userform with scroll bar. When I open the form, it
opens in the middle of the form. I would like for the form to open at
the top of the form. I am sure there must be an easy way to do this
in the initialize sub, but I do not know how to do it. Could someone
help me with the code to open the form at the top of the form? I
appreciate it.

Thanks.
 
The code goes in the Userform Initialize sub. However, the position appears
to be screen based and not related to Excel worksheets.

Left = 0 and top = 0 for top left of screen.

Private Sub UserForm_Initialize()
UserForm1.Left = 200
UserForm1.Top = 350
End Sub
 
Forgot to say Set the forms StartUpPosition property to Manual.

Thanks. Yes, it does position the userform on the screen as you say,
and for reasons I do not understand, the form now opens at the top. I
had to make a minor adjustment, as the form is wide and long, and I
minimize the worksheet page behind it when I display the form so that
the background is not as cluttered and distracting, so I made smaller
parameters (75 and 80 instead of 200 and 350), but you are correct,
the form now opens at the top of the form instead of in the middle.
Ahhh, the mysteries of life.

Thanks for your help.
 
Back
Top