Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Open userform at top of form

Forgot to say Set the forms StartUpPosition property to Manual.

--
Regards,

OssieMac

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you make a userform open automatically when you open excel? Evan Excel Worksheet Functions 1 March 11th 10 02:24 AM
Worksheet form vs. Userform...which is better? Webtechie Excel Discussion (Misc queries) 5 August 24th 08 09:23 AM
Using a template form, advance a form number everytime you open ShoDan Excel Discussion (Misc queries) 1 January 31st 08 01:34 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
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? Daniel[_14_] Excel Programming 1 August 29th 04 01:20 PM


All times are GMT +1. The time now is 07:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"