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?

RE: Can you change the size of a userForm using Code? by Angyl

Angyl
Wed Nov 01 11:54:02 CST 2006

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.

"Angyl" wrote:

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

Re: Can you change the size of a userForm using Code? by Jonathan

Jonathan
Wed Nov 01 11:59:39 CST 2006


"Angyl" <Angyl@discussions.microsoft.com> wrote in message
news:4BE72EAF-90FC-4765-B201-30101BE7E0B5@microsoft.com...
> 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



Re: Can you change the size of a userForm using Code? by Angyl

Angyl
Wed Nov 01 13:15:02 CST 2006

purrrrrfect.

Thanks, Jonathan!

"Jonathan West" wrote:

>
> "Angyl" <Angyl@discussions.microsoft.com> wrote in message
> news:4BE72EAF-90FC-4765-B201-30101BE7E0B5@microsoft.com...
> > 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
>
>
>