Fix Excel WindowState xlNormal Not Restoring Maximized Window in Microsoft 365
Question details
A VB6 application fails to restore an Excel window to a normal state from a maximized state using WindowState = xlNormal. Attempting to set Width or Height subsequently causes an error in Microsoft 365 build 2409.
- Product
- Microsoft Excel (Microsoft 365 build 2409)
- Device & OS
- not provided
- Scenario
- Automating Microsoft Excel via a VB6 application to resize and restore application windows.
- Observed behavior
- Setting WindowState to xlNormal does not restore the maximized window, and subsequent attempts to modify window dimensions result in runtime errors.
Ensure your VB6 code snippet works as expected in previous Excel versions (like Excel 2019) and note down the exact Microsoft 365 build number you are currently running.
Submit a Support Ticket via Microsoft 365 Admin Center
Since this issue is likely an Office build regression introduced in build 2409, escalating the issue to Microsoft Support is the recommended path for a permanent fix.
This behavior is known to affect specific Microsoft 365 builds where automation compatibility changes prevent the xlNormal state from executing correctly.
Collect your Office build number, the specific VB6 code used for window automation, and the exact steps to reproduce the error.
Have an administrator log into the Microsoft 365 admin center.
Navigate to Support > Help & support, and create a new service request detailing the Office build regression.
Update or Roll Back the Office Build
Testing the application on a different Microsoft 365 build can act as a temporary workaround while Microsoft addresses the regression.
Use WPS Office for Reliable Spreadsheet Management
If Microsoft 365 updates frequently disrupt your workflow with compatibility regressions, consider switching to WPS Office. It provides a lightweight, highly compatible alternative for viewing and managing your spreadsheets without the heavy overhead and frequent breaking changes of Microsoft 365.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package.
- 2. Install the Software: Follow the on-screen instructions to install WPS Office on your PC.
- 3. Open Your Spreadsheets: Launch WPS Spreadsheets and seamlessly open your existing Excel files.

Frequently Asked Questions
Why does WindowState = xlNormal fail only in Microsoft 365?
Microsoft frequently updates Microsoft 365, and occasionally these updates introduce regressions or changes to the automation API that break compatibility with older VB6 applications. Older versions like Excel 2019 are unaffected because they do not receive these continuous feature updates.
Can I use Windows API functions to resize the Excel window instead?
Yes, as a workaround, you can use Windows API calls like ShowWindow and SetWindowPos to manually restore and resize the Excel application window, bypassing Excel's native WindowState property.
How do I check my current Microsoft 365 build number?
Open Excel, click on 'File', select 'Account', and look under the 'About Excel' section. The version and build number will be displayed there.




