Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi folks,
to position a user form rightmost on the monitor I miss a preset constant for the property StartUpPosition aside of 'manual', 'centerowner', 'centerscreen' and 'windows default'. To set 'left' manually by a program-function at least I need to detect the screenwidth of the present monitor but do not know how. Can somebody help me out, maybe even with a code example right away (for not to invent the wheel again :-) )? Thanks. Regards Peter |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Peter
The following is code I got from this group and use a lot: Application.WindowState = xlMaximized Me.Top = 0 Me.Left = 0 Me.Height = Application.Height Me.Width = Application.Width Of course it does not do exactly what you want, but, I think it could get you started. To position a userform to the right, you could go with Me.Left=Application.Width - Me.Width and Me.Left=0 will put it on the left. The maximizing statement may or may not be relevant to your situation. Good luck. Ken Norfolk, Va Peter Ostermann wrote: Hi folks, to position a user form rightmost on the monitor I miss a preset constant for the property StartUpPosition aside of 'manual', 'centerowner', 'centerscreen' and 'windows default'. To set 'left' manually by a program-function at least I need to detect the screenwidth of the present monitor but do not know how. Can somebody help me out, maybe even with a code example right away (for not to invent the wheel again :-) )? Thanks. Regards Peter |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John,
thanks for the hint, but.... "John Bundy" (remove) wrote This returns the vakue for the msoScreenSize, just search for what each value represents MsgBox Application.DefaultWebOptions.ScreenSize ....... using that statement it returns "3", what ever that means. Regards Peter -John Northwest11 Please rate when your question is answered to help us and others know what is helpful. "Peter Ostermann" wrote: Hi folks, to position a user form rightmost on the monitor I miss a preset constant for the property StartUpPosition aside of 'manual', 'centerowner', 'centerscreen' and 'windows default'. To set 'left' manually by a program-function at least I need to detect the screenwidth of the present monitor but do not know how. Can somebody help me out, maybe even with a code example right away (for not to invent the wheel again :-) )? Thanks. Regards Peter |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ken,
you gave exactly the hint what I was looking for! Thanks. "Ken" wrote Me.Left=Application.Width - Me.Width Good luck. Ken Norfolk, Va Greetings to Norfolk. I have good memories to that place. Peter Oldenburg, NW-Germany www.pkf-ostermann.de |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
user form StartUpPosition | Excel Programming | |||
vbModal, VBA version, StartUpPosition Setting | Excel Programming | |||
vbModal, VBA version, StartUpPosition Setting | Excel Programming |