Earlier today I came across values which would set the startup position of a userform when shown. I can see only four options. Is anyone aware of a technique which will position the userform in the bottom left corner of the screen?
T.I.A.
Positioning a Userform
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Positioning a Userform
Regards
Don
Don
-
- 2StarLounger
- Posts: 196
- Joined: 31 Mar 2011, 03:41
- Location: Perth, Western Australia
Re: Positioning a Userform
First, set form's StartUpPosition to Manual (0)
then
Kevin
then
Code: Select all
Private Sub UserForm_Initialize()
With Application
Me.Left = .Left + .Width - Me.Width
Me.Top = .Top + .Height - Me.Height
End With
End Sub
-
- 5StarLounger
- Posts: 689
- Joined: 27 Jan 2010, 16:45
- Location: Ottawa, Ontario, Canada
Re: Positioning a Userform
Thanks for the insight Kevin. That gave me the bottom right. I got the bottom left with:Becks wrote:First, set form's StartUpPosition to Manual (0)
thenKevinCode: Select all
Private Sub UserForm_Initialize() With Application Me.Left = .Left + .Width - Me.Width Me.Top = .Top + .Height - Me.Height End With End Sub
Code: Select all
Me.Left = .Left
Regards
Don
Don
-
- 2StarLounger
- Posts: 196
- Joined: 31 Mar 2011, 03:41
- Location: Perth, Western Australia
Re: Positioning a Userform
Left ?
You really wanted it on the bottom RIGHT - I could tell
(it makes for more instructive code)
Kevin
You really wanted it on the bottom RIGHT - I could tell
(it makes for more instructive code)
Kevin