VBA Lesson 26: Labels in VBA for Excel
In the toolbox the label has this icon . The label is a passive control meaning that the user never really acts on it. It is there to inform the user and to label other controls like text boxes, combo boxes or list boxes.
Among the properties of the label is:
- WordWrap: If you want to write more than one line of text in a label set this property to "True" .
Adding a Label to a Userform
To add a label to a userform you left click on its icon in the toolbox. You move the cursor to the userform, you click again and the label appears. You can then resize it to your liking. If you double click on the label icon in the toolbox you can then click on the form as many times as you need labels. When you are finished adding labels just click once on the label icon of the toolbox.
We hope you have enjoyed this introduction to lesson 26
Go to the next lesson