Resizing a form at run-time?
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 |
Resizing a form at run-time?
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. "Gustaf" wrote: 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 |
Resizing a form at run-time?
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 On 28 Sep, 14:28, Gustaf wrote: 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 |
Resizing a form at run-time?
Hi,
Stephen Bullen's FormFun example contains the API code to resize a userform. http://www.oaltd.co.uk/Excel/Default.htm For a non API approach see my example. http://www.andypope.info/vba/resizeform.htm Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Gustaf" wrote in message ... 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 |
Resizing a form at run-time?
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) On Mon, 28 Sep 2009 15:28:02 +0200, Gustaf wrote: 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 |
All times are GMT +1. The time now is 07:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com