VBA & Macro Problems

How to Fix Excel VBA Editor Font Size Reverting to 12

John WilsonJohn Wilson Oct 22, 2026 868 views

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.
Before you start

Ensure you have saved all your work and completely closed all Microsoft Office applications to prevent settings from being overwritten while you are troubleshooting.

Solution 1Recommended

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.

1
Open Registry Editor

Press Win + R on your keyboard, type 'regedit' into the Run dialog box, and press Enter to launch the Windows Registry Editor.

2
Navigate to the VBA Registry Key

In the left pane, navigate to the following path: HKEY_CURRENT_USER\SOFTWARE\Microsoft\VBA\7.1\Common.

3
Create or Edit the FontHeight Value

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'.

4
Set the Desired Font Size

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.

5
Restart Excel

Close the Registry Editor and open Microsoft Excel. Launch the VBA Editor (Alt + F11) to confirm the new font size is applied and retained.

Modify FontHeight via Windows Registry Editor
Backup the Registry: Always back up the registry or create a system restore point before making manual changes, as incorrect modifications can cause system instability.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your device.
  2. 2. Install and Launch: Run the installer and follow the on-screen instructions. Once installed, launch WPS Spreadsheet.
  3. 3. Open Your Workbooks: Click 'Open' to load your existing Excel files and enjoy a stable, glitch-free editing experience.
Highly compatible with Microsoft Excel (.xlsx, .xls, .csv, .xlsm) formats.Lightweight design that runs smoothly on all devices, including high-res laptops, without interface glitches.Includes an advanced spreadsheet tool with robust macro support.Familiar user interface that requires zero learning curve to migrate.
microsoft office alternative - wps office

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.