Office tutorials

ActiveX controls – Label in Excel VBA

Building an application for entering data – Inserting Labels – Label (ActiveX Control) 

The label Label is already known to us and should not require a broader discussion. How do you insert a Label Label? From the ActiveX controls in the Developer tab, select the Label control. Next, we put 3 labels next to the combo boxes responsible for entering the day, month and year. You can change their name in the properties of the control by editing the Caption position . Then inserta header label for our application. Let’s call it “Data entry”. The font size of the label can also be changed in the properties by editing the Font position . For the needs of the application, select 18px font.

 

Programming the remaining elements of the application

Of the elements to be programmed in our application, we still have to insert the date of the record addition. Using the Date ()function, we change the code of our program in the Sheet1 object.

In addition to the date of introduction, we would like each time the data is entered, our form would clean up its fields, like after clicking the “Clear” button. We would also like the introduction of a single record to trigger the MsgBox window with information on the success of the operation.

The code of our program in the Sheet1 object looks like this. At the bottom of the article was also attached the application file that we wrote. Yes, yes, it’s the end of programming our application 🙂

Leave a Reply

Your email address will not be published.