Can you change the size of a userForm using Code?

A

Angyl

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?
 
A

Angyl

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.
 
J

Jonathan West

Angyl said:
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)


--
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
 
A

Angyl

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top