Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dropping a UserForm
Is there any way that I can make a UserForm drop to the bottom of the
screen and automaticly stretch to fill the entire width of the screen. The catch is that it has to adjust it self automaticly to the width of the screen, no matter what resolution the screen is in. How do I do that. Thx.. Rune Daub --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dropping a UserForm
You can make the userform larger, but it isn't a zoom type operation - the
controls on the form will not resize: Sub UserForm_Activate() With Application 'maximize Excel .WindowState = xlMaximized Me.Top = .Top Me.Left = .Left Me.Height = .Height Me.Wdith = .Width End With End Sub Sub FormFit() UserForm1.Show End Sub The above assumes excel is maximized. (I added code to maximize it) To get more information on manipulating userforms with code, see Stephen Bullens formfun download. http://www.bmsltd.co.ie/Excel/Default.htm With reference to what is shown in FormFun.zip, Stephen Bullen posted the following advice for maximizing: Hi Gerry, That example does allow you to maximize the form if the maximize option is selected. Would it be difficult to cause the form to start maximized, rather than at the originally defined size? Basically, I'd like to pre-select Maximized. Sure, it's just a different constant passed to the ShowWindow API that's already in there. [in the formfun code] To show a form maximised, use this: At the top of the module Private Const SW_MAXIMIZE = 3 In the Form Property Set: 'Show Maximized ShowWindow hWndForm, SW_MAXIMIZE after setting the form's style bits. Regards Stephen Bullen Microsoft MVP - Excel ================= This post by Stratos Malasiotis shows a method probably similar to Stephen's, but is complete and primarily addresses sizing: http://groups.google.com/groups?selm...94FA0%40iti.gr -- Regards, Tom Ogilvy Rune_Daub wrote in message ... Is there any way that I can make a UserForm drop to the bottom of the screen and automaticly stretch to fill the entire width of the screen. The catch is that it has to adjust it self automaticly to the width of the screen, no matter what resolution the screen is in. How do I do that. Thx.. Rune Daub --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dropping a Score | Excel Discussion (Misc queries) | |||
XY chart not dropping off to 0, when there is not value | Charts and Charting in Excel | |||
Dropping Zeros | Excel Worksheet Functions | |||
Dropping 0 | Excel Discussion (Misc queries) | |||
Dropping Data to a VB.net Program | Excel Programming |