Subscribe for Weekly Tutorials
BONUS: subscribe now to download our Top Tutorials Ebook!
UserForm Properties List and Explanation
This is a listing of all properties for the UserForm in Excel. Each property includes an explanation of what it is, what values you can use for it, and how you might use it.
UserForm Properties
Property | Description |
---|---|
(Name) |
The name of the UserForm. This name will be used to reference the form, including when you need to open, close, or hide it. |
BackColor |
Background color of the UserForm. |
BorderColor | Color of the border for the UserForm. This will not appear unless you set the next property to 1 - fmBorderStyleSingle. |
BorderStyle |
If the form will have a border or not. 0 - fmBorderStyleNone - there will be no border. 1 - fmBorderStyleSingle - a border will appear with the color that was specified in the BorderColor property. |
Caption | Text that appears on the top of the UserForm. Basically, this is the title of the form's window. |
Cycle |
Controls how it works when a user is tabbing (hitting the Tab key) through a series of controls. 0 - fmCycleAllForms - the user can tab through all of the controls in the form without having to explicity select or click another control. 2 - fmCycleCurrentForm - the user can only tab through the controls within the same Frame or MultiPage control within the form. To change the focus outside of the current Frame or MultiPage control, the user will have to explicity click outside of it. (This is a seemingly confusing property that you will most likely never need to use.) |
DrawBuffer | The number of pixels set aside for off-screen memory in rendering a frame. (This usually doesn't need to be adjusted unless the form is flickering.) |
Enabled |
If the UserForm can be used or not - it's best not to mess with this from the properties window. True - form is enabled and can be used regularly. False - form is disabled and cannot be used by the user or respond to any user-generated events. |
Font |
Allows you to change the size, style, and font of text; it also allows adding an underline or strikeout to text. This property for the UserForm controls the default Font settings for any controls that are added to the form; however, this will not change the Font characteristics of any element that was previously added to the form before this property was changed. |
ForeColor |
Controls the default color of text within the form. This changes the text color for these controls: Label, TextBox, Frame, TabStrip, MultiPage. The default text colors can be overridden for each control individually. |
Height | The height of the form, in points. |
HelpContextID | Allows you to attach a custom help file to the form that is called when the user pressed F1. Leave this at its default 0 unless you made a custom helpfile in Windows and know the HelpContextID for it. |
KeepScrollBarsVisible |
If scroll bars will remain visible when not required. (Scrollbars must be set to visible using the ScrollBars property for this to do anything.) 0 - fmScrollBarsNone - no scroll bars appear when not needed. 1 - fmScrollBarsHorizontal - horizontal scroll bars always appear. 2 - fmScrollBarsVertical - vertical scroll bars always appear. 3 - fmScrollBarsBoth - both horizontal and vertical scroll bars always appear. |
Left |
The distance of the form from the left edge of the screen. To use this feature, set the StartUpPosition property to 0 - Manual. |
MouseIcon |
Custom mouse icon. You must use an approriate icon image for this property, .ico or .cur files. Set the MousePointer property to 99 - fmMousePointerCustom when using this option. |
MousePointer |
The type of mouse pointer displayed when the user hovers the mouse over the form. 0 - fmMousePointerDefault 1 - fmMousePointerArrow 2 - fmMousePointerCross 3 - fmMousePointerIBeam 6 - fmMousePointerSizeNESW 7 - fmMousePointerSizeNS 8 - fmMousePointerSizeNWSE 9 - fmMousePointerSizeWE 10 - fmMousePointerUpArrow 11- fmMousePointerHourGlass 12 - fmMousePointerNoDrop 13 - fmMousePointerAppStarting 14 - fmMousePointerHelp 15 - fmMousePointerSizeAll 99 - fmMousePointerCustom - set this option when using a custom icon for the MouseIcon property. |
Picture | Background image to use for the form. |
PictureAlignment |
Alignment of the background picture if it was set in the Picture property. 0 - fmPictureAlignmentTopLeft 1 - fmPictureAlignmentTopRight 2 - fmPictureAlignmentCenter 3 - fmPictureAlignmentBottomLeft 4 - fmPictureAlignmentBottomRight |
PictureSizeMode |
How to display the background picture if one is being used for the form. 0 - fmPictureSizeModeClip - image displayed in its actual size. 1 - fmPictureSizeModeStretch - image is stretched to fill the entire form, even if it distorts the image. 3 - fmPictureSizeModeZoom - image is stretched to fit the form while maintaining its original ratio. It will not expand beyond the edges of the form, which means it may not fill the entire background of the form, unless the PictureTiling property is set to True. |
PictureTiling |
Allows for a background image to be tiled. This allows for an image that would not fill the entire background of the form to be repeated until it is covered. True - image is tiled to fill the background of the form. False - image is not tiled. |
RightToLeft |
Controls the text display direction on systems where the user might read right-to-left. True - user reads right-to-left. False - user reads left-to-right. (default value) |
ScrollBars |
Controls if the form has scroll bars. 0 - frmScrollBarsNone - don't show scroll bars. 1 - frmScrollBarsHorizontal - show horizontal scroll bars. 2 - frmScrollBarsVertical - show vertical scroll bars. 3 - frmScrollBarsBoth - show both horizontal and vertical scroll bars. |
ScrollHeight | The height, in points, of the total area that can be viewed by moving the scroll bars on the form. |
ScrollLeft | The distance, in points, of the left or top edge of the visible form from the left or top edge of the logical form. |
ScrollTop | The distance, in points, of the left or top edge of the visible form from the left or top edge of the logical form. |
ScrollWidth | The height, in points, of the total area that can be viewed by moving the scroll bars on the form. |
ShowModal |
Sets a UserForm to be modal or modeless in its display. Read-only at run time. True - user cannot do anything in Excel while the UserForm is being displayed. False - user can work in Excel while the UserForm is being displayed. (generally not recommended) |
SpecialEffect |
Some basic formatting/framing options for the UserForm. 0 - fmSpecialEffectFlat 1 - fmSpecialEffectRaised 2 - fmSpecialEffectSunken 3 - fmSpecialEffectEtched 6 - fmSpecialEffectBump |
StartUpPosition |
Controls the position of the UserForm when it is first opened. 0 - Manual - starting position is specified by the Top and Left properties. 1 - CenterOwner - starting position is the center of the Excel window. 2 - CenterScreen - starting position is the center of the computer screen, even if it is not within the Excel window. 3 - WindowsDefault - starting position is the upper-left corner of the computer screen. |
Tag |
Additional information about the form. This can be up to 2048 characters in length. You can use this property to, for instance, store information about the form and then display it as needed. |
Top |
The distance of the form from the top edge of the screen. To use this feature, set the StartUpPosition property to 0 - Manual. |
WhatsThisButton |
If you want to show the question mark help button in the title bar of the UserForm window. Read-only at run time. This property does not apply to the Macintosh. True - show the help button. False - don't show the help button. |
WhatsThisHelp | Determines whether context-sensitive Help uses the pop-up window or the main Help window. Read-only at run time. This property does not apply to the Macintosh. |
Width | The width of the form, in points. |
Zoom |
Allows you to set a zoom level for everything in the UserForm. The form itself will remain the same size, but the contents will zoom in or out accordingly. The value for this property is a whole number that represents percentage. 50 = 50% 100 = 100% Etc. |