System Fonts and System Font Sizes


Your computer has a large number of fonts in various sizes. Only a few fonts, in a few sizes, are relevant for UserForms. To limit the choices to a practical range, MDUF defines fonts and font sizes in two ranges on the worksheet “SysFonts” of the Project workbook. Although every Project workbook can have its own set of system fonts and system font sizes, it’s expected that all projects in a given organization would likely use the same set of fonts and font sizes. MDUF is distributed with an initial selection of fonts and font sizes, but you’re free to change these to whatever you have available on your computers. 

Introduction to the SysFonts worksheet

Four controls on the worksheet “SysFonts” of the Project workbook enable modifying the set of system fonts and the set of system font sizes. Although these four controls reside on the worksheet “SysFonts” of the project workbook, they behave like command buttons do on UserForms. The four controls are named Add Fonts…, Remove Fonts…, Add Font Sizes… and Remove Font Sizes…. These controls invoke, respectively, the mDialogBoxes illustrated below.

You can add any fonts in any sizes that are available on your computer. And you can remove any fonts or sizes that you think you don’t need. If you try to remove all fonts, though, MDUF inserts Lucida Grande as the sole available system font. If you try to remove all font sizes, MDUF inserts 10 point as the sole available system font size. Do not attempt to modify the SystemFonts or SystemFontSizes ranges manually. 

Why MDUF projects have system fonts and system font sizes

Your computer probably has hundreds of fonts and dozens of font sizes installed. And when you try to specify a font for a control in Excel, for example, you must scroll through dozens or hundreds of these possibilities before you find a font or font size that’s suitable for your situation.

MDUF avoids this scrolling problem by including a list of system fonts and a list of system font sizes. They are the fonts and font sizes that you actually use for UserForms. You can see the names of these fonts and their sizes by activating the worksheet “SysFonts” of a Project workbook.

You can add or remove fonts and font sizes from these lists. And these lists can be tailored to the needs of each project. 

Removing system fonts: introduction to the Controls Editor

There’s a problem with removing system fonts or system font sizes from an existing project. That problem arises when one or more of the project’s controls uses the system font or system font size that you’re about to remove. If you remove such a font or font size, then when you later generate a UserForm that uses that font or font size, the results are unpredictable.

That’s why it’s problematic to remove from a project a system font or system font size that’s in use. When you try to do that, MDUF posts a warning message, and asks you whether you want to edit the controls that use that font or font size. If you decline, the font or font size is not removed. You can then chase around your project looking for the controls or options that use that font or font size and fix them.

That’s the hard way. The easy way is to accept MDUF’s offer to help you edit the affected UserForms or controls. If you do accept the offer, MDUF opens the Controls Editor. The next section contains guidance for using the Controls Editor. 

Using the MDUF Controls Editor

When the Controls Editor opens for a font removal, it displays a range whose rows correspond to controls. There are four cells in each row. They represent, in order from left to right:

  • The name of the UserForm that holds the control
  • The name of the control
  • The name of the font the control now uses, which is the font you’re about to delete
  • MDUF’s suggestion for a replacement font

Below is a screenshot of the Controls Editor for a font removal. As elsewhere in MDUF, yellow tint indicates cells you can edit.

If you’re deleting a font size instead of a font, then the Controls Editor displays, for each control, the current font size in the third cell, and a suggested replacement font size in the fourth cell.

Above the column headings in the range containing the controls data is a row of command buttons. Three commands are available.

Install All

This command causes MDUF to operate on each of the listed controls in turn. For each one, MDUF replaces the Current Font with the Replacement Font (or the Current Font Size with the Replacement Font Size). Although “DefaultFont” is not a font that Excel recognizes, DefaultFont directs MDUF to calculate the font as indicated in “Basic UserForm properties”.

Install Selected Replacements

This command installs replacements only for those controls whose rows overlap with the Selection.

Generate Affected UserForms

This command causes MDUF to generate the UserForms of all controls listed in the Controls Editor. After changing the SystemFonts or SystemFontSizes, be certain to regenerate any previously generated UserForms that used those fonts or font sizes.