How to Fix Excel VBA Code Window Stuck or Cannot Move on Mac
Question details
The Excel VBA editor window becomes maximized or stuck on macOS, making it impossible to minimize or move.

- Product
- Microsoft Excel for Mac
- Device & OS
- macOS
- Scenario
- Editing VBA macros when multiple code windows are open and one gets maximized.
- Observed behavior
- The VBA code window gets stuck in a maximized state, cannot be moved vertically, and other windows also maximize without the ability to restore them.
Before troubleshooting, ensure you have saved your macro code in a separate text file as a backup and verify that your Mac has the latest system updates installed.
Transfer Code to a New Module or Workbook
Move your existing VBA code to a fresh module or an entirely new workbook to reset the window behavior.
This glitch often happens in older versions of Excel on Mac (like version 16.44 on Big Sur) when one of the code windows is maximized, causing all subsequent windows to lock in a maximized state. Recreating the module forces the VBA editor to reset the layout properties.
Open the stuck VBA editor window in Excel for Mac, select all of your macro code, and copy it to your clipboard.
In the Project Explorer pane on the left side of the Visual Basic Editor, right-click your VBAProject, select 'Insert', and choose 'Module'.
Paste your copied code into the newly created module window.
Right-click the old, problematic module in the Project Explorer, select 'Remove', and choose 'No' when asked if you want to export it before removing.

Update Microsoft Excel and macOS
Software bugs in specific versions can cause UI glitches. Updating your software can apply the developer's patches to resolve window sizing issues.
Try WPS Office for a Stable Spreadsheet Experience
If you frequently encounter interface bugs or stuck windows in Microsoft Excel for Mac, consider switching to WPS Office. It provides a highly compatible, lightweight, and smooth spreadsheet editor without the hassle of recurring display glitches.
- 1. Download the software: Visit the official WPS Office website and download the installation package designed for macOS.
- 2. Install WPS Office: Open the downloaded file and follow the on-screen instructions to drag and drop WPS Office into your Applications folder.
- 3. Open your macro workbook: Launch WPS Spreadsheets and open your existing .xlsm or .xlsx files to continue your work without experiencing stuck windows.

Frequently Asked Questions
Why do all my VBA windows maximize when I maximize one on Mac?
This is a known interface glitch in certain versions of Excel for Mac (such as version 16.44). Once one window is maximized, the application struggles to restore the cascading or tiled window views, forcing all other windows to follow suit.
Can I reset the VBA window layout without deleting my code?
Sometimes using the 'Window' menu options in the VBA editor to tile or cascade windows can temporarily reset the layout. However, if the window is deeply stuck, copying the code to a new module is the most reliable fix.
Does WPS Office support Excel macros?
Yes, WPS Office provides excellent support for VBA macros in its professional and certain regional editions, allowing you to run and edit your existing Excel macros seamlessly.
Where are VBA modules saved in Excel for Mac?
VBA modules are stored within the workbook file itself. You can view, export, or delete them using the Project Explorer pane inside the Visual Basic Editor.




