Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default Align the form to the top left

How to align the form to the top left? Right now when the form is
initialized, it is centrally aligned.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Align the form to the top left

Set the startup position in the initialize event.

Private Sub UserForm_Initialize()
UserForm1.StartUpPosition = 3
End Sub

--
HTH...

Jim Thomlinson


"Scott" wrote:

How to align the form to the top left? Right now when the form is
initialized, it is centrally aligned.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Align the form to the top left

I should have mentioned my use of 3. In VB (not VBA) there are constants for
the start up position. Here they are

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.

VBA does not have the same constants but you can declare them if you wish...
I just used 3...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

Set the startup position in the initialize event.

Private Sub UserForm_Initialize()
UserForm1.StartUpPosition = 3
End Sub

--
HTH...

Jim Thomlinson


"Scott" wrote:

How to align the form to the top left? Right now when the form is
initialized, it is centrally aligned.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default Align the form to the top left

Thanks. It works.

I've also found that I can select "3 - Windows Default" under
"StartUpPosition" on "Properties" of the form.

"Jim Thomlinson" wrote:

I should have mentioned my use of 3. In VB (not VBA) there are constants for
the start up position. Here they are

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.

VBA does not have the same constants but you can declare them if you wish...
I just used 3...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

Set the startup position in the initialize event.

Private Sub UserForm_Initialize()
UserForm1.StartUpPosition = 3
End Sub

--
HTH...

Jim Thomlinson


"Scott" wrote:

How to align the form to the top left? Right now when the form is
initialized, it is centrally aligned.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Align the form to the top left


Private Sub UserForm_Initialize()
Me.StartUpPosition = 0
Me.Left = 0
Me.Top = 0
End Sub


--
Hope that helps.

Vergel Adriano


"Scott" wrote:

How to align the form to the top left? Right now when the form is
initialized, it is centrally aligned.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default Align the form to the top left

Thanks, it works.

"Vergel Adriano" wrote:


Private Sub UserForm_Initialize()
Me.StartUpPosition = 0
Me.Left = 0
Me.Top = 0
End Sub


--
Hope that helps.

Vergel Adriano


"Scott" wrote:

How to align the form to the top left? Right now when the form is
initialized, it is centrally aligned.

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
Align Left and Right in Same Cell Sloth Excel Discussion (Misc queries) 6 April 25th 23 03:44 AM
Align to the left or to the right (or center) kaokao1 Excel Programming 2 June 6th 06 04:09 AM
PivotTable: how to align row data to the left? blackpuppy[_2_] Excel Programming 2 May 17th 06 03:16 AM
Left align '$' and right align numbers? skeetley Excel Discussion (Misc queries) 1 October 21st 05 08:12 AM
Merge & align ..left? Joesph Excel Programming 1 March 6th 05 10:46 PM


All times are GMT +1. The time now is 09:32 AM.

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

About Us

"It's about Microsoft Excel"