+ Reply to Thread
Results 1 to 10 of 10

Making Userforms appear in the middle of the primary screen

  1. #1
    Registered User
    Join Date
    09-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    34

    Making Userforms appear in the middle of the primary screen

    I work over two screens, one is via the usual monitor port, the other is through a HDMI cable.

    When I activate a userform, it pops up against the side of the secondary screen, not in the middle of the primary screen.

    Is there any way to set the location that the userform pops up to?

    Is it possible to set that location to be in the middle of the screen that the excel spreadsheet is open on?

    thanks in advance... i don't have the fuzziest idea where to start on this one.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Making Userforms appear in the middle of the primary screen

    In the Userform Properties (on the Categorized Tab) under Position:
    Change the Top, Left or StartUpPosition.

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Making Userforms appear in the middle of the primary screen

    It's not something I've done, but I suspect you might need APIs to set the main excel window as the parent of the userform (IIRC, the desktop is normally the parent).
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    09-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Making Userforms appear in the middle of the primary screen

    In the Userform Properties (on the Categorized Tab) under Position:
    Change the Top, Left or StartUpPosition.
    Changing the startup position didn't do anything. "Centre Owner" and "Centre Screen" still plonked the userform on the lefthand edge of the right hand screen.

    Changing the startup position to "windows default" made the userform appear at the top left hand corner of the lefthand screen... Which is the main screen.

    Using the manual setting, i've managed to set it to the middle(ish) of the second screen... Will this setting change if different users have different sized screens? Will this screw things right up if the user has only one screen?

  5. #5
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    Re: Making Userforms appear in the middle of the primary screen

    I have used 2 monitors for years.

    I don't know why or if you have a need to use the HDMI cable. I use one monitor from the motherboard and the other from a standard monitor display card. I can have anything come up on either monitor and in the same position each time. If I drag an excel workbook to the other monitor, it will be there the next time that it is opened.

    Both monitors are the same size, but different mfg's. I believe that all the settings of each monitor remain as is and can be changed independently.

    This may give you some ideas ?
    Thanks for helping . . .
    Matt @ Launchnet

  6. #6
    Registered User
    Join Date
    09-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Making Userforms appear in the middle of the primary screen

    The reason I use a HDMI cable is i'm running two monitors off a laptop computer. So I've got one connected normally, then another via hdmi.

    both my screens are exactly the same.

    I'm thinking its just my machine... I've got the same macro implemented over several machines. Nobody else has this problem. All their userforms pop up dead smack bang in the middle of their workbook, every time. Even one of the guys that has three screens, it still works perfectly.

    I'll post back if i manage to sort it out.

  7. #7
    Registered User
    Join Date
    09-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Making Userforms appear in the middle of the primary screen

    Fixed it...

    By switching the main screen. Go figure.

    If there is some guru out there with a reason this happens, i'm all ears. But for the moment: you can fix it by changing your main screen.

  8. #8
    Registered User
    Join Date
    01-19-2009
    Location
    UK
    MS-Off Ver
    2007
    Posts
    60

    Re: Making Userforms appear in the middle of the primary screen

    This doesn't help much, but I also have the issue. I haven't looked into it much but I'll experiment with it this evening and post some info if it helps.

    I'm also running a second screen from a laptop. I only have my laptop screen, and then the monitor conencted via HDMI. It could be something related to Mobile GPU's or maybe the HDMI cable but I wouldn't think a cable could have much effect on that sort of thing.

    What graphics card do you have?
    .
    - AKK9 -

  9. #9
    Registered User
    Join Date
    09-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Making Userforms appear in the middle of the primary screen

    Quote Originally Posted by tenk283 View Post
    Fixed it...

    By switching the main screen.
    Graphics card isn't anything special. And i don't think the cable would screw with window (as in application window) position.

    But i managed to fix it. Try switching your main screen from wherever it is to wherever its not (if you catch my meaning).

    It seems windows is interferring with Excel's screen position.

  10. #10
    Registered User
    Join Date
    01-19-2009
    Location
    UK
    MS-Off Ver
    2007
    Posts
    60

    Re: Making Userforms appear in the middle of the primary screen

    It's hard to say how a graphics card and/or it's drivers can actually affect your system. I think you'd be surprised what sort of problems can come with just a new driver on it's own.

    Anyway, it's a little different on my laptop:

    If I close Excel on my secondary monitor and then re-open (it reopens in the same position I closed it) my boxes appear in some retarded place no matter where I move the window. However, if I close Excel and open it on my primary monitor the dilog boxes appear in the centre of the Excel window, even after I move it or maximise it to my secondary monitor.

    Not sure if this helps or not but if it works for you it could be a better solution than having to change your primary monitor every time.

+ 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