Other UserForm Properties


In other sections, we’ve discussed UserForm properties whose values you declare by entering them into cells. In this section, we examine other properties of UserForms and their controls.

UserForm properties whose values you enter into cells

In “Basic UserForm properties“, we discussed properties of UserForms and their controls whose values you declare by entering them into cells of the FormSpec worksheet. By way of review, here are some examples.

Name
Left
Top

Width
Height
Caption

ForeColor
BackColor
BorderColor

Other UserForm properties

But UserForms have many more properties, including:

ControlSource
ControlTipText
Cycle
DrawBuffer
Enabled
Font
FontSize
HelpContextID
KeepScrollBarsVisible

MouseIcon
MousePointer
Picture
PictureAlignment
PictureSizeMode
PictureTiling
ScrollHeight
ScrollLeft
ScrollTop

SpecialEffect
StartUpPosition
Tag
VerticalScrollBarSide
Visible
WhatsThisButton
WhatsThisHelp
Zoom

Altogether, all controls and the UserForm itself have almost 100 properties that aren’t included in the visible portions of the FormSpec worksheet. To include them would have made the FormSpec worksheet difficult to use. To clarify the difficulty of the design problem, just below is a table showing the number of properties you can adjust for each given control type in the Mac versions of Microsoft 365. In addition, MultiPage Pages, which aren’t actually controls, have 21 properties.

Control TypeNumber of PropertiesControl TypeNumber of Properties
CheckBox
ComboBox
CommandButton
Form
Frame
Image
Label
ListBox
27
45
25
27
30
17
24
33
MultiPage
OptionButton
ScrollBar
SpinButton
TabStrip
TextBox
ToggleButton
26
28
20
18
20
38
24

Moreover, many of the properties have default values that don’t require adjustment for most routine situations. But we do need a way to set values for these properties when the Excel defaults aren’t appropriate. We do this with the MDUF Properties Editor.

In addition to the Properties Editor for UserForms, every type of control—CommandButton, CheckBox, ComboBox, and the rest—has a Properties Editor. Each Editor is tailored to include only the properties that pertain to that type of control. So the MDUF Properties Editor is actually a set of 16 mDialogBoxes—one for the UserForm, one for Page, and one for each of the 14 control types. Each of these 16 mDialogBoxes of the Properties Editor was generated by MDUF from a FormSpec worksheet. 

Introduction to the Properties Editor

Although these FormSpec worksheets of the Properties Editor are very similar to the FormSpec worksheets that you can construct, they’re a tad more complicated than most FormSpec worksheets, owing to the complexity of the Excel UserForm design space.

You invoke the Properties Editor for the UserForm with the Ribbon command This Control>Properties>Edit…. If the active cell belongs to a particular control’s record, then the Properties Editor displays the mDialogBox appropriate for editing the properties of that control.

You then use that mDialogBox to set properties corresponding to your needs, and finally save the results. When you ultimately generate your UserForm, MDUF then uses the results that you previously saved from the Properties Editor.

To edit the properties of a control to Excel’s defaults, use the ribbon command This Control>Properties>Edit….

For more about the properties editor, see “The Properties Editor“.