Fix Visual Basic Editor Font Size Not Changing in Windows
Question details
The user is unable to successfully change or save the font size settings within the Visual Basic Editor.

- Product
- Visual Basic Editor
- Device & OS
- Windows
- Scenario
- Attempting to increase or modify the code font size in the VBA editor for better code readability.
- Observed behavior
- The font size settings revert or fail to apply when Windows display scaling is set to a value higher than 100%.
Ensure you save any open documents and close background applications before modifying system display settings, as your screen will briefly refresh during the process.
Temporarily Adjust Windows Display Scaling to 100%
Bypass the scaling interference by temporarily setting your Windows display scaling back to the default 100% before applying the font size change.
High DPI scaling settings in Windows can sometimes interfere with older interface components like the Visual Basic Editor, preventing them from registering configuration changes.
Right-click on an empty area of your Windows desktop and select 'Display settings' from the context menu, or navigate to Start > Settings > System > Display.
Scroll down to the 'Scale and layout' section. Note your current scaling percentage (e.g., 125% or 150%), then click the drop-down menu and change it to 100%.
Open your Visual Basic Editor. Go to the top menu and click Tools > Options. Select the 'Editor Format' tab, choose your desired font size, and click OK.
Once the new font size is successfully applied in the editor, return to the Windows Display settings and revert the 'Scale and layout' drop-down back to your original percentage.

Edit VBA Macros Seamlessly in WPS Office
WPS Office provides a robust, fully compatible Visual Basic Editor for handling your macros without the hassle. Experience smooth coding and easy customization within WPS Spreadsheets.
- 1. Open WPS Spreadsheets: Launch WPS Office and open a new or existing spreadsheet document.
- 2. Access the VBA Editor: Navigate to the 'Tools' tab on the top ribbon and click on 'Visual Basic Editor', or simply press Alt + F11 on your keyboard.
- 3. Customize Editor Format: Inside the editor, click on 'Tools' > 'Options' from the top menu bar, then switch to the 'Editor Format' tab.
- 4. Save Preferences: Select your preferred font size and style from the available lists, then click 'OK' to apply your settings.

Frequently Asked Questions
Why does Windows display scaling prevent VBA font changes?
High DPI scaling settings in Windows can interfere with the way certain legacy interfaces like the Visual Basic Editor process user inputs. The editor fails to properly map the 'OK' button click when scaling is above 100%, causing the save action to be ignored.
Can I change the font style and color in the Visual Basic Editor?
Yes, you can customize both the font style and text colors. Go to Tools > Options > Editor Format in the VBE. From there, you can select specific foreground and background colors for different code elements like keywords, comments, and text.
Will the font size reset if I restart my computer?
No. Once the font size change is successfully applied while Windows scaling is set to 100%, the setting is permanently saved to your registry. It will persist even after you restore your preferred display scaling and reboot your PC.




