LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default How to bottom-align a control on a UserForm?

I've dropped a button on a UserForm. The UserForm is user-resizeable
(thanks to Bullen's FunForm.)

What height property or other vertical quantity do I access in order
to programmatically position the button flush against the bottom of
the form? I want to re-bottom-justify the button in UserForm_Resize
(hope that's the correct event).

I've tried:

1) UserForm.Height seems to be useless, because it seems to include
the form's caption area. So if I say:

Button1.Top = UserForm.Height - Button1.Height

then the button's too low by approx. UserForm's caption.

2) Application.UseableHeight sounds promising, but on one Win 2K PC it
seems to return Excel's own (or possibly the open workbook's) useable
height, which is, like 100 pixels (points?) larger than
UserForm.Height.

(BUT, on another Win 2K PC with a different screen res., the button
ends up aligning PERFECTLY, no matter how the user resizes the form.
Don't quite understand THAT coincidence.)

3) UserForm has no UseableHeight property that I can see.

I suppose another way of asking this is: Is there a way to determine
the height of an application's caption area?

Thanks much.

***
 
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
Text won't align at bottom of cells in Excel 2007. BillCT1984 Excel Discussion (Misc queries) 1 February 19th 10 07:19 PM
Selecting control on userform with part of control name (set question) Keith Excel Programming 4 January 10th 07 02:24 PM
Bug ! Textbox on userform will not align text correctly ? Grenier Excel Programming 2 January 8th 07 07:28 AM
Text-align in buttons userform Gert-Jan Excel Programming 1 August 23rd 06 04:02 AM
Control Sequence from Userform Control Nigel Excel Programming 3 December 29th 04 01:25 PM


All times are GMT +1. The time now is 01:45 AM.

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

About Us

"It's about Microsoft Excel"