Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

Can you change the size of a userForm using Code?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Angyl - 01 Nov 2006 18:43 GMT
I'm just getting fancy here in the project I'm working on, but what I have is
up to 4 owners you can add to a company, and each time you click a check box
to add an owner, a frame appears with information in it to add the owner.

The result of this is the initial form looks WAAAAAY longer than it should
(since only one owner Frame is visible initially).

Question is: is it possible to adjust the size of the user form so that I
can make it small enough for just the one frame and then when the user clicks
the check box to add another owner, the second fame appears and the form gets
bigger to accomodate it?
Angyl - 01 Nov 2006 18:54 GMT
Nevermind, I found out how to adjust the size of the form using the .height
attribute.  

What I need to know now is how to move the submitButton down with it.

> I'm just getting fancy here in the project I'm working on, but what I have is
> up to 4 owners you can add to a company, and each time you click a check box
[quoted text clipped - 7 lines]
> the check box to add another owner, the second fame appears and the form gets
> bigger to accomodate it?
Jonathan West - 01 Nov 2006 18:59 GMT
> Nevermind, I found out how to adjust the size of the form using the
> .height
> attribute.
>
> What I need to know now is how to move the submitButton down with it.

Change the Top property of the button.

If you want to experiment with resizing userforms, go to
http://www.oaltd.co.uk/Excel/Default.htm and download FormFun. (The link is
in the VBA Programming section, about halfway down the page)

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Angyl - 01 Nov 2006 20:15 GMT
purrrrrfect.

Thanks, Jonathan!

> > Nevermind, I found out how to adjust the size of the form using the
> > .height
[quoted text clipped - 7 lines]
> http://www.oaltd.co.uk/Excel/Default.htm and download FormFun. (The link is
> in the VBA Programming section, about halfway down the page)

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.