+ Reply to Thread
Results 1 to 8 of 8

Dual Monitors and exact Userform position in the Active window

  1. #1
    Registered User
    Join Date
    05-02-2012
    Location
    LeftCoast
    MS-Off Ver
    Excel 2007
    Posts
    33

    Smile Dual Monitors and exact Userform position in the Active window

    Hello All,

    I have explored threads about the Dual Monitor and UserForm position recently. Many solutions have been offered, some work, some don't. As well, most solutions deal with a Userform 'centered' in the screen. My intent is that the end-user would be using only 1 monitor for the Excel Active Window and UserForm even if they may have a Dual Monitor set-up. My goal is to have a solution that allows the UserForm to be located in the lower-left side (or any other chosen position) of the Excel Active Window monitor, in Full Screen Mode, so I can design the sheet pages around this position placement. Confidence in the ultimate UserForm position for the end-users is paramount.

    I am new to VBA but am surprised that the solutions to this subject are so mercurial. Any help would be most appreciated! I apologize in advance if I have overlooked possibly posted solutions.

    55horses.

    .....

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Dual Monitors and exact Userform position in the Active window

    This is strictly a thought (so make a test copy before you try anything), but what happens when you set the properties within the _activate event like:

    Please Login or Register  to view this content.
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Registered User
    Join Date
    05-02-2012
    Location
    LeftCoast
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Dual Monitors and exact Userform position in the Active window

    Quote Originally Posted by AlvaroSiza View Post
    This is strictly a thought (so make a test copy before you try anything), but what happens when you set the properties within the _activate event like:

    Please Login or Register  to view this content.
    Thanks for replying. Adding the above bit of code throws the UserForm onto the second monitor. It is left and low, but travels off of the page in both respects.

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Dual Monitors and exact Userform position in the Active window

    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  5. #5
    Registered User
    Join Date
    05-02-2012
    Location
    LeftCoast
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Dual Monitors and exact Userform position in the Active window

    All,

    that last selection did the job. The only limitation being that it is center-screened and I can't seem to get around to forcing it to a particular position. For now, I can live with this. I don't want to get too hung up on this part or the whole project will lag.

    thanks very much.

  6. #6
    Registered User
    Join Date
    09-06-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Dual Monitors and exact Userform position in the Active window

    Please Login or Register  to view this content.
    Sorry for bumping an old thread, but the solution suggested simply doesn't work for me... although basic maths suggests it should, everything looks okay but on Excel 2k10 this doesn't center properly on any screen which the application is on. The .Top seems to be okay, but the .Left is way too much to the left. If I try to debug it... I just set .Left = Application.Left, so the left side of the userform should intersect which the left edge of the window, on the primary monitor it intersects perfectly, on the secondary monitor the userform actually is quite a bit way left of the left edge of the window when I do this, when I manually move the userform to the edge of the window it's clear that Application.Left isn't being reported correctly for an Excel instance on the secondary monitor. The Application.Width properties also seems to be a little too large for both monitors which means that the the overall .Left is increased, put all this together and it doesn't center properly.

    What I'm getting from this is the Application.Width and Application.Left properties aren't being reported corrrectly. I've tried this on multiple Excel 2010 systems, is there an alternative to this method? It should work but it doesn't on my systems..

    Many thanks.

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Dual Monitors and exact Userform position in the Active window

    Hello RedWing.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

  8. #8
    Registered User
    Join Date
    01-03-2015
    Location
    Ontario, Canada
    MS-Off Ver
    Ms Office Professional 2010
    Posts
    1

    Re: Dual Monitors and exact Userform position in the Active window

    for position the userform. Is possible to start at the bottom of the monitor going up?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1