Get usable height with UserForm.InsideHeight.

B

baobob

I was agonizing over trying to bottom-align controls on a UserForm
(which is user-sizeable thanks to Bullen's FunForm), and realized I
had fallen victim to PDD (Programmer Deficit Disorder).

Doofusly, I had missed InsideHeight (and InsideWidth) in UserForm's
list of properties. It seems akin to Application.UsableHeight - giving
you the form's height minus the pesky caption at top.

(Application.UsableHeight doesn't seem to work, because I think it
returns the main Excel's, or workbook's, usable area and not the
UserForm's.)

So my implementation in UserForm_Resize now sez:

with ControlToBeBottomJustified
..Top = UserForm.InsideHeight - .Height

I thought this property important enough to remind everyone of.

***
 

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

Similar Threads


Top