ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   aligning a form on the screen (https://www.excelbanter.com/excel-programming/311763-aligning-form-screen.html)

JT[_2_]

aligning a form on the screen
 
A form is displayed when my macro runs. Right now it is
in the center of my screen. I would like to keep it in
the center but move it to the far right of the screen. Is
there a way to program this?

I have looked at the properties but none of do what I
would like the form to do. Thanks for the help......

Doug Glancy

aligning a form on the screen
 
JT,

This is interesting. I assumed you would use the Left property in the
UserForm Initialize module. However it only works if I put in the Activate
module:

Private Sub UserForm_Activate()
Me.Left = ActiveWindow.Width - Me.Width
End Sub

hth,

Doug Glancy

"JT" wrote in message
...
A form is displayed when my macro runs. Right now it is
in the center of my screen. I would like to keep it in
the center but move it to the far right of the screen. Is
there a way to program this?

I have looked at the properties but none of do what I
would like the form to do. Thanks for the help......





All times are GMT +1. The time now is 10:07 AM.

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