Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
Dropping a Score Christi Excel Discussion (Misc queries) 1 April 2nd 08 12:10 AM
XY chart not dropping off to 0, when there is not value drjayr2002 Charts and Charting in Excel 4 January 4th 08 03:03 PM
Dropping Zeros Rene'' Excel Worksheet Functions 8 April 23rd 07 08:32 PM
Dropping 0 Peter F Excel Discussion (Misc queries) 5 December 14th 06 04:23 PM
Dropping Data to a VB.net Program BrianElson Excel Programming 1 December 16th 03 12:37 PM


All times are GMT +1. The time now is 08:25 AM.

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

About Us

"It's about Microsoft Excel"