Microsoft Excel Macros

 

VBA Lesson 26: Labels  in VBA for Excel

In the toolbox the label has this icon   VBA for Excel labels 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.

Properties

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.


Go to the next lesson
Lesson
27 : Text Boxes in VBA for Excel


SUMPRODUCT  ¦   INDEX/MATCH  ¦   SUBTOTAL  ¦   ISERROR  ¦   HLOOKUP  ¦   LOOKUP  ¦   VLOOKUP
COUNTIF  ¦   SUMIF  ¦   IFERROR

 

left arrow Back home