I have a userform that is the same width of the excel window which is maximized. I have dual monitors.
Currently the Application.Left is -1445 when excel opens in the left screen, so the screen on the left seems to be in the negative number.
I set userform.left = application.left, and userform.width = application.width, but even though I cannot see the excel window in the right screen, I can see the right tip of my userform in the right screen. I placed some buttons on the right-most of the user form, so the fact that the tip of the userform is peeking into the right screen means my buttons are not perfectly positioned.
If I have a single screen, this is easy to fix, because I know if the application.left is a negative number, then part of Excel is "off screen" and I can adjust the width of the userform by the negative number. However, because the application.left takes into account 2 screens: I can no longer determine how far to shorten the userform.
Does anyone have a solution to this? How do I ensure that no part of the userform is peeking into the right monitor? Thanks!
Bookmarks