How to Center a VBA UserForm Across Multiple Monitors
Question details
The user needs to correctly center a VBA UserForm when using multiple displays with different settings.

- Product
- Spreadsheets
- Device & OS
- not provided
- Scenario
- Moving a VBA UserForm between a laptop display and an external monitor.
- Observed behavior
- The UserForm appears off-center or contains excessive blank space when moved between screens.
Verify that your external monitor and laptop display scaling settings are configured correctly, as mismatched DPI scaling between two displays is the most common cause of off-center UserForms.
Adjust the UserForm StartUpPosition Property
Use the built-in VBA properties to force the UserForm to center relative to the active application window rather than the primary screen.
Press Alt + F11 to launch the VBA Editor in your spreadsheet application.
In the Project Explorer pane on the left, locate and click on the UserForm you want to center.
Press F4 to display the Properties window for the selected UserForm.
Locate the StartUpPosition property and change its value to '1 - CenterOwner'. This ensures the form centers within the application window, regardless of which monitor the application is currently occupying.

Standardize Windows Display Scaling
Prevent excessive blank space and alignment issues by setting both monitors to use the exact same DPI scaling percentage.
Use Windows API to Dynamically Center the Form
If standard properties fail, use an advanced Windows API script to retrieve exact screen metrics for precise placement.
Seamlessly Run and Edit VBA Macros in WPS Office
WPS Office provides robust support for VBA and macros. You can design, edit, and accurately position UserForms across multiple monitors just as you would in other spreadsheet software, but within a highly efficient application.
- 1. Enable Developer Tools: Open WPS Spreadsheets, navigate to the Options menu, and ensure the Developer tab is enabled in your ribbon layout.
- 2. Launch the VBA Editor: Click the Developer tab and select 'Visual Basic', or press Alt + F11, to open the built-in VBA editor.
- 3. Customize Your UserForm: Insert a new UserForm, adjust the StartUpPosition property to CenterOwner, and test it across your external monitors seamlessly.

Frequently Asked Questions
Why does my VBA UserForm shrink when moved to another monitor?
This occurs due to DPI (Dots Per Inch) scaling differences between your monitors. When moving a UserForm from a high-DPI laptop screen to a standard external monitor, the system attempts to rescale it, which can cause internal elements to shrink or appear distorted.
What is the difference between CenterScreen and CenterOwner in VBA?
CenterScreen (StartUpPosition = 2) places the UserForm in the middle of the primary monitor, regardless of where the application window is located. CenterOwner (StartUpPosition = 1) places the UserForm in the middle of the active application window, making it the ideal setting for multi-monitor setups.
How do I fix excessive blank space inside my UserForm?
Excessive blank space often happens when the UserForm's external dimensions scale up, but the internal controls remain at their original coordinates. Ensuring uniform DPI scaling across your displays in Windows Settings, or using a dynamic resizing macro in the UserForm_Initialize event, will resolve this layout issue.
Do these VBA scaling issues occur in WPS Office?
WPS Office fully supports VBA macros and respects standard system scaling rules. If your UserForm is configured with the correct StartUpPosition (such as CenterOwner) and your monitors are configured properly, it will center seamlessly in WPS Office across multiple screens.




