Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing of picture different in run time and design time Broadband-Al[_2_] Excel Programming 3 September 26th 09 07:29 PM
Text box in User Form resizing upon data entry Barb Reinhardt Excel Programming 1 November 8th 06 03:53 PM
Resizing user form in excell [email protected] Excel Programming 6 July 27th 06 05:20 AM
Resizing list boxes in a form Alan[_22_] Excel Programming 0 February 24th 04 06:21 PM
resizing an image on a form Liam[_2_] Excel Programming 1 November 14th 03 10:06 PM


All times are GMT +1. The time now is 04:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"