PC Review


Reply
Thread Tools Rate Thread

Align the form to the top left

 
 
=?Utf-8?B?U2NvdHQ=?=
Guest
Posts: n/a
 
      8th Aug 2007
How to align the form to the top left? Right now when the form is
initialized, it is centrally aligned.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      8th Aug 2007
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.

 
Reply With Quote
 
=?Utf-8?B?VmVyZ2VsIEFkcmlhbm8=?=
Guest
Posts: n/a
 
      8th Aug 2007

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 With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      8th Aug 2007
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.

 
Reply With Quote
 
=?Utf-8?B?U2NvdHQ=?=
Guest
Posts: n/a
 
      8th Aug 2007
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.

 
Reply With Quote
 
=?Utf-8?B?U2NvdHQ=?=
Guest
Posts: n/a
 
      8th Aug 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Align left and Align right in the same cell Lostguy Microsoft Excel Discussion 2 12th Jan 2009 10:15 AM
I have 'align left' and 'align centre' on tool bar I need align ri Blue Shadow Microsoft Word Document Management 1 17th Dec 2007 07:30 PM
Align Form fully to the left =?Utf-8?B?UGV0ZQ==?= Microsoft Access Forms 3 14th Nov 2007 09:18 PM
How to right align text but left align lines on first character? =?Utf-8?B?bXNjZXJ0aWZpZWQ=?= Microsoft Word Document Management 1 10th Aug 2006 09:48 PM
how to Align text left & vertical align middle Kay Microsoft ASP .NET 2 25th Jul 2003 09:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 AM.