How to Fix Excel VBA Editor Font Size Reverting to 12
Question details
The user needs to prevent the Excel VBA Editor from automatically resetting the font size to 12 after attempting to customize it.
- Product
- Microsoft Excel
- Device & OS
- Windows
- Scenario
- Customizing the Visual Basic Editor environment for better code readability.
- Observed behavior
- The font family can be successfully changed, but the font size immediately reverts to 12, an issue particularly noted on certain high-resolution devices like Microsoft Surface.
Ensure you have saved all your work and completely closed all Microsoft Office applications to prevent settings from being overwritten while you are troubleshooting.
Modify FontHeight via Windows Registry Editor
Manually overriding the font size directly in the Windows Registry bypasses the software glitch causing the font size to reset in the editor UI.
The Excel VBA Editor stores its configuration in the Windows Registry. When the UI fails to save the font size properly, you can manually define the 'FontHeight' DWORD value to force the editor to use your preferred size.
Press Win + R on your keyboard, type 'regedit' into the Run dialog box, and press Enter to launch the Windows Registry Editor.
In the left pane, navigate to the following path: HKEY_CURRENT_USER\SOFTWARE\Microsoft\VBA\7.1\Common.
Look for a DWORD (32-bit) Value named 'FontHeight' in the right pane. If it does not exist, right-click an empty space, select New > DWORD (32-bit) Value, and name it 'FontHeight'.
Double-click 'FontHeight'. In the Base section, select 'Decimal'. Enter your desired font size (e.g., 14 or 16) into the Value data field and click OK.
Close the Registry Editor and open Microsoft Excel. Launch the VBA Editor (Alt + F11) to confirm the new font size is applied and retained.

Check Security Software and Office Updates
Third-party security tools or outdated Office builds can sometimes block configuration changes from saving correctly.
Use WPS Office for a Seamless Spreadsheet Experience
If you are tired of troubleshooting registry errors and VBA editor glitches in Microsoft Office, consider switching to WPS Office. It provides a highly compatible, lightweight, and completely free alternative for your daily spreadsheet and macro needs.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your device.
- 2. Install and Launch: Run the installer and follow the on-screen instructions. Once installed, launch WPS Spreadsheet.
- 3. Open Your Workbooks: Click 'Open' to load your existing Excel files and enjoy a stable, glitch-free editing experience.

Frequently Asked Questions
Why does the VBA Editor font size keep reverting to 12?
This is a known glitch in certain builds of Microsoft Office, often triggered on specific devices with high-DPI scaling like the Microsoft Surface. The UI fails to write the updated size back to the Windows Registry properly, causing it to fall back to the default size of 12.
Can I change the font style alongside the font size in the Excel VBA Editor?
Yes, you can change the font style by going to Tools > Options and selecting the Editor Format tab. Unlike the font size bug, font family changes typically save correctly without needing a manual registry tweak.
Will modifying the registry affect other Office applications?
Yes, the specific registry path for VBA (HKEY_CURRENT_USER\SOFTWARE\Microsoft\VBA\7.1\Common) affects the Visual Basic for Applications editor globally. Changing the FontHeight here will successfully update the VBA Editor font size across Excel, Word, PowerPoint, and Access.




