Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think they are only able to be set from the TOP of the form not the
bottom.(could be wrong though) Is the form height programmed ? If so you could probably use that code to set the button position. If not i think you would have to adopt the button TOP procedure. Ctm wrote in message ... 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. *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ctm:
Thanks very much for reply. But I think I've found the answer, namely: PIADAU (Programmer Is A Doofus As Usual). I *completely* didn't notice InsideHeight (and companion InsideWidth) in UserForm's list of properties. Tried it on the problematic PC, and it works. I feel this property is so important, I'll post another thread. Thanks again. *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text won't align at bottom of cells in Excel 2007. | Excel Discussion (Misc queries) | |||
Selecting control on userform with part of control name (set question) | Excel Programming | |||
Bug ! Textbox on userform will not align text correctly ? | Excel Programming | |||
Text-align in buttons userform | Excel Programming | |||
Control Sequence from Userform Control | Excel Programming |