Resizing a form at run-time?

G

Gustaf

Using Excel 2003. There is a Resize event on the UserForm class, but I can't figure out how to resize forms at run-time, by dragging the borders. There's no resize mouse pointer when I hover over the borders. I've been looking for a property to allow resizing forms, but can't find it.

In my case, I want to allow the user to expand the form height (but not width). The minimum height should be the form's startup height.

Any ideas?

Gustaf
 
P

Patrick Molloy

I use the form's click event. you could add a button for this. I suspect its
possible using API calls but I've nevere done so.
 
A

Andrew

The book, Professional Excel Development, by Stephen Bullen, Rob Bovey
and John Green has code that allows you to resize the form by dragging
the borders as you describe. This is a non-trivial piece of
programming so I won't copy it here but it is wrapped up in a class
module on the included CD for easy use. I know this isn't probably
the quick answer you were looking for but this is one of my favourite
books so if you're still keen on resizeable forms then I'd say it
would be worth the wait and cost.

Cheers,
Andrew
 
C

Chip Pearson

I have a library of functions that changes a number of properties of a
userform at run time, including making the form resizable. All said
and done, the library has about 20 functions to control all aspects of
a user form. The core of the library is based on Windows API
functions, but these are all wrapped up into nice, VBA-friendly
wrappers.

See http://www.cpearson.com/Excel/formcontrol.aspx for examples and
downloadable code.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

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