Overview of Control properties in UserForms; this includes what they are, how to change them, and some common properties.
This tutorial is very similar to the UserForm Properties Overview tutorial since properties for UserForms and Controls share a lot of similarities; if you read that tutorial you can feel confident in skimming this one.
How to Change Control Properties
Properties for Controls control how they look and how they function.
Controls have many different kinds of properties. Each Control will have the same basic properties, but then it will have properties that are specific to that type of Control. So, a CommandButton will not have all of the properties that a TextBox has; this makes sense since a TextBox needs to respond to a user's input and more can be done with it compared to a simple button.
It's important to note that each command may have unique properties since this tutorial will not cover every property for every Control. Unique properties will be covered within the tutorials for each Control.
Here, we focus on the basic concept of Properties and the ones that are shared with most Controls.
The properties for a Control are located in the Properties window after you click on that specific Control.
Go to the VBA window (Alt + F11) and double-click the desired form from the Project window. If you don't see the Project window, hit Ctrl + R or go to View > Project Explorer.
Once you see the form, click on the desired Control and look to the Properties window; if you don't see this window, hit F4 or go to View > Properties Window.
Every Control and every form has its own set of properties. Some properties, such as the Font and ForeColor, can be set for the form and will then be the default setting for Controls. However, you can change the property setting for each control in order to override the setting for the form.
As mentioned above, many Controls have properties and settings that are specific to them; here, I'll cover the main Properties that you might want to change.
(Name) - the name of the control that is used in programming the VBA and macros. Make this name descriptive and easy to understand because you may need to reference it when you build the form.
Caption - this is visible text that will appear on the Control. For a CommandButton, this is the text of the button; for a Frame, this appears at the top of it; for a Label, this appears within it.
Font - this sets the size, format, and appearance of the font for the Control, except for its color.
ForeColor - this sets the color of the font.
There are many other properties that you can edit, but these are the most commonly changed; to get more information, look for the tutorial on that specific type of Control.
You can quickly and easily select any Control by using the drop-down menu in the Properties window.
Each item lists its name, from the (Name) property, and then it states what kind of item it is, be it a CommandButton or a Label or the UserForm itself.
This menu makes it easy to navigate between items, espeically if they may be overlapping or difficult to find on the form.
This is also one more reason to change the (Name) property to something that is descriptive and useful.
Properties control how a Control appears and functions. This tutorial provides merely an introduction to basic properties for a Control, and this should help you start to feel more comfortable with the concept of Control Properties. Keep reading the UserForm tutorials to learn a lot more about Controls, their Properties, and what you can do with them.
Download the sample file for this tutorial if you want to see the file included in the images above.