PDA

View Full Version : Center Userform/splash son monitor



csalcedo
05-01-2008, 02:02 PM
I have a couple of userforms that I run for a Purchase Order application.

The first screen is nothing more than a splash screen that has the company logo and a progress bar gives you the sensation that its loading something (it dosnt nothing really..). After this finishes loading it then unloads and load the real userform that does all the work...

If the excel sheet was last saved in the window maximized then the userforms will open up in the center of the screen, but if the window is resized and put un a corner then that where the userforms open..

Keep in mind that when you double click the sheet to open it loads the userforms because I have the userform.show under the workbook.open sub.

So after that long winded explanation .. how can I force the userforms to always open in the center of the monitor regardless of the resolution.....

rory
05-01-2008, 03:22 PM
Have you tried setting its startup position to CenterScreen instead of CenterOwner?

lucas
05-01-2008, 04:12 PM
Another possibility would be to maximize excel when it opens, add the following to workbook open probably before the userform load statement.
untested
Application.WindowState = xlMaximized

csalcedo
05-02-2008, 09:32 AM
The CenterOwner property works great....
Thanks rory...
Lucas, your sugestion is what I was using as a workaround... great minds think alike :)

Thanks guys...