ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UserForm positioning (https://www.excelbanter.com/excel-programming/306625-userform-positioning.html)

Emil

UserForm positioning
 
Hello,

When opening a UserForm I want it to be positioned in the lower right
corner of the screen, regardless of which screen resolution being used.
I have tried:

UserForm1.Top = GetSystemMetrics32(1) - UserForm1.Height
UserForm1.Left = GetSystemMetrics32(0) - UserForm1.Width

But this does not work properly, apparently because of the different
units being used in these different functions (pixels, points etc.) Can
anyone help me?

Thanks for a great forum!

Regards

//Emil


---
Message posted from http://www.ExcelForum.com/


Bob Phillips[_6_]

UserForm positioning
 
Chip Pearson has a page that positions a form by cell position. Try that
http://www.cpearson.com/excel/FormPosition.htm

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Emil " wrote in message
...
Hello,

When opening a UserForm I want it to be positioned in the lower right
corner of the screen, regardless of which screen resolution being used.
I have tried:

UserForm1.Top = GetSystemMetrics32(1) - UserForm1.Height
UserForm1.Left = GetSystemMetrics32(0) - UserForm1.Width

But this does not work properly, apparently because of the different
units being used in these different functions (pixels, points etc.) Can
anyone help me?

Thanks for a great forum!

Regards

//Emil


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com