The Labels in VBA for Excel
|
613-749-4695 (Peter) |
Tips and Ideas on Excel |
Tips and Ideas on Macros |
VBA Chapter 24B of 24: The 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. Properties The other interesting properties of the label are: - TabStop: To make the control invisible for the "Tab" and "Enter" keys (see Tab Order) set this property to "False" . Code There is not much coding developed for the labels although there are 8 events related to the label. For example there is an event named "MouseMove" . If you develop code within this event it is executed when the mouse moves over the label. If the code is the following: You can stack many labels one over the other and make their "Visible" property to "False" . You can then make any of the label visible from an event related to another control. For example if a user chooses a certain value in a combo box a certain label appears. |
Next Chapter: Programming Text Boxes in VBA for Excel |
VBA Table of Contents |
Discover Even More in 50 Excel spreadsheets |
|
613-749-4695 (Peter) |
Tips and Ideas on Excel |
Tips and Ideas on Macros |
The Labels in VBA for Excel