Label is used to display descriptive text or information or instructions. It can be title, caption, etc. It can be used on the WorkSheet. You can see how it works and more details about ActiveX Label Control on the Worksheet in the following chapter.
VBA ActiveX Label_Control on the Worksheet
Please find more details about VBA ActiveX Label Control on the Worksheet.
-
- Go To Developer Tab and then click Insert from the Controls
- Click on the Label from the ActiveX Controls group.
- Drag the control on the Worksheet.
- Right click on the Label, before that Design Mode should be turned ON.
- Click on properties from the available list.
- On the left side find ‘Caption’ from the available properties of the control.
- On the right side mention as ‘Welcome To analysistabs.com’. Please find the below screen shot for the same.
- Like this you can add number of Label controls on the Worksheet according to your requirement.
Delete Label_Control on the Worksheet using VBA
Please find the below code, it will show you how to delete or remove the control on the worksheet. In the below example, its deleting the Label named ‘Label1’ which is on the worksheet named ‘Sheet11’. Where Delete is the property of Shape object.
Sub Delete_Label() Sheets("Sheet11").Shapes("Label1").Delete End Sub
Hi,
I wish to know after making a label caption on a userform be copy/transfer along with filled user form data to a excel sheet?
Regards,
Gamini
Hi,
Can you code this :
Create a button in userform and give the command that after clicking the button new userform opened and display some text which is writen in excle sheet2.