Other Properties of Controls


The FormSpec worksheet enables specification of properties of all controls. Each control has a record (a single row) on the worksheet. The cells of the worksheet hold values for the control’s properties. But not all properties are represented in cells. There are just too many for that.

How MDUF represents the other properties of controls

Represented in cells are the properties all controls have, namely Name, Left, Top, Width, Height, and Backcolor. In addition, some of the more commonly used properties of some controls also appear in cells of the FormSpec worksheet. They are shown in the tables below. Because the table is so wide it appears here in several parts.

In this first part are properties that appear as cells in the FormSpec worksheet.

Command-ButtonNameLeftTopWidthHeightPageTabIndexTabStop
LabelNameLeftTopWidthHeightPageTabIndexTabStop
TextBoxNameLeftTopWidthHeightPageTabIndexTabStop
ListBoxNameLeftTopWidthHeightPageTabIndexTabStop
CheckBoxNameLeftTopWidthHeightPageTabIndexTabStop
ImageNameLeftTopWidthHeightPageBackColorBorderColor
ComboBoxNameLeftTopWidthHeightPageTabIndexTabStop
FrameNameLeftTopWidthHeightPageTabIndexTabStop
OptionButtonNameLeftTopWidthHeightPageTabIndexTabStop
SpinButtonNameLeftTopWidthHeightPageTabIndexTabStop
ToggleButtonNameLeftTopWidthHeightPageTabIndexTabStop
TabStripNameLeftTopWidthHeightPageTabIndexTabStop
MultiPageNameLeftTopWidthHeightPageTabIndexTabStop
PageNameMpgIndexCaptionTransition-EffectTransition-PeriodScrollBarsKeepScroll-BarsVisible
ScrollBarNameLeftTopWidthHeightPageTabIndexTabStop
RefEditNameLeftTopWidthHeightPageTabIndexTabStop
FormNameLeftTopWidthHeightCaptionForeColorBackColor

Next are properties that you set with the Properties Editor.

Command-ButtonTabIndexTabStopCaptionDefaultForeColorBackColor  
LabelTabIndexTabStopCaptionTextAlignForeColorBackColorBorder-ColorBorder-Color
TextBoxTabIndexTabStopMultiLineTextAlignForeColorBackColor 
ListBoxTabIndexTabStopMultiSelectForeColorBackColorBorderColor 
CheckBoxTabIndexTabStopCaptionForeColorBackColor 
ImageBackColorBorder-Color 
ComboBoxTabIndexTabStopListRowsForeColorBackColorBorderColor 
FrameTabIndexTabStopCaptionForeColorBackColorBorderColor 
OptionButtonTabIndexTabStopCaptionForeColorBackColorGroupName 
SpinButtonTabIndexTabStopSmall-ChangeForeColorBackColorMinMax 
ToggleButtonTabIndexTabStopCaptionTextAlignValueForeColorBack-Color 
TabStripTabIndexTabStopForeColorBack-Color 
MultiPageTabIndexTabStopForeColorBackColorPages 
PageScrollBarsKeepScroll-BarsVisibleScroll-HeightVerticalScroll-BarSideScrollLeftScrollTopScrollWidthZoom
ScrollBarTabIndexTabStopForeColorBackColorSmall-ChangeLarge-ChangeMinMax
RefEditTabIndexTabStopForeColorBackColorBorderColor 
FormForeColorBackColorBorderColor     

Setting values for these properties is straightforward. For colors, you use the Set/Clear Color command of the MDUF ribbon tab. For properties that appear on the FormSpec worksheet, you enter the value you want in the property’s cell. But as we’ve noted, there are numerous other properties of UserForm controls. To set values for these properties, you use the MDUF Properties Editor. 

The Properties Editor

The Properties Editor is actually a collection of 15 mDialogBoxes (one for each type of control, and one for the Form itself). The Properties Editor also includes the code needed to present, error-check, and save the property values you edit.

You invoke a Properties Editor mDialogBox by first selecting a cell in the record of the control whose properties you want to edit. Then you invoke the MDUF ribbon command This Control>Properties>Edit….  Excel then presents the mDialogBox titled “Properties Editor” for the control whose record contains the active cell.

Each mDialogBox of the Properties Editor contains one control for each of the properties you can edit. In its most basic use, you adjust the properties you want to adjust, and then save the result. The figure below shows the Properties Editor for a Label control that happens to be on the FormSpec worksheet for the Label component of the Properties Editor itself. This illustrates what you see when you invoke a Properties Editor for a Label control.

If you’ve previously adjusted and saved some properties, when an mDialogBox of the Properties Editor first appears, it shows the values you’ve set. If you’ve never adjusted and saved a given property in the past, the Properties Editor mDialogBox shows you Excel’s default values.  The Properties Editor doesn’t provide indication of property values that differ from Excel’s defaults. 

Additional commands of the Properties Editor

Reset Control Properties

Invoking the MDUF command This Control>Properties>Reset resets the values of all editable properties to the Excel defaults. There is no undo. Values of properties not handled by the properties editor, such as captions, colors, and locations, are not affected.

The primary purpose of this command is to “clean the slate” if things get too confused. 

Commands not yet implemented

  • Reset properties of all controls on the mDialogBox to Excel defaults