Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open userform at top of form
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open userform at top of form
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 -- Regards, OssieMac " wrote: 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open userform at top of form
Forgot to say Set the forms StartUpPosition property to Manual.
-- Regards, OssieMac |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open userform at top of form
On Aug 7, 12:37*am, OssieMac
wrote: Forgot to say Set the forms StartUpPosition property to Manual. -- Regards, OssieMac 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you make a userform open automatically when you open excel? | Excel Worksheet Functions | |||
Worksheet form vs. Userform...which is better? | Excel Discussion (Misc queries) | |||
Using a template form, advance a form number everytime you open | Excel Discussion (Misc queries) | |||
Activating userform and filling it with data form row where userform is activate | Excel Programming | |||
Is it possible to open the VBA form with a link in a sheet and to pass variable from a cell to the VBA form? | Excel Programming |