Hi,
I use a macro to display a user form. This form is displayed properly on a single screen, but incorrectly on dual screens. Even though the application is at full screen on the primary monitor, the userform pops up on the secondary monitor.
This behavior does not seem to occur with msgbox popups.
I've tried setting the StartUpPosition property to CenterOwner or CenterScreen, but it does not make any difference.
Would anyone have sample code that can be used to properly calculate the position so that the form is displayed at the center of the screen where the application is running?
Note: this behavior occurs in Word, but I assume it's the same in Excel. (posting here because this Excel forum is so good for these VB questions).
Thanks
Erik
I use a macro to display a user form. This form is displayed properly on a single screen, but incorrectly on dual screens. Even though the application is at full screen on the primary monitor, the userform pops up on the secondary monitor.
This behavior does not seem to occur with msgbox popups.
I've tried setting the StartUpPosition property to CenterOwner or CenterScreen, but it does not make any difference.
Would anyone have sample code that can be used to properly calculate the position so that the form is displayed at the center of the screen where the application is running?
Note: this behavior occurs in Word, but I assume it's the same in Excel. (posting here because this Excel forum is so good for these VB questions).
Thanks
Erik