User Forms in Excel

What is a UserForm in Excel? You can make data entry into an Excel worksheet easier and automate calculations for the user by creating a user-friendly interface with the help of a userform.
How to create a user-form:

  • Click on the Developer Tab in the Microsoft Office Ribbon
  • Select Visual Basic
  • From the Microsoft Visual Basic Window that pops up, select Insert from the menu bar.
  • A default UserForm1 is created in a directory called Forms and a form with the Caption UserForm1 appears. If the form is selected which you can know if you see the handles around it, you’ll also see a box called Toolbox which has many icons called controls.
  • With the Form selected click on view in the menu bar and select properties window to see another window that displays the properties of the Form.
  • Enter a name of the form like ‘frmEmpData’ and a caption like ‘Employee Data’ to make the userform look more user-friendly.
  • You can now add labels, text boxes and command buttons on the form by clicking on the controls and then clicking and dragging on the user-from.
  • You can set the properties of the controls.
  • Next you can write appropriate VBA code which will execute at your command or at run-time. For example, we have added a line of code to the command button to transfer the name of the employee from the text-box to the Excel worksheet.

Watch the Excel VBA training video to understand the details.

6 thoughts on “User Forms in Excel

  1. Hi sir, I am new here but I am serious looking for help. I am on my way to learn VBA. when try using the Userform , I cant trace microsoftmonthview for date and time in the additional control section. I have even downloaded OCX and install yet I dont have the activexcontrol.

    I would appreciate if there is any help.

    Best Regards

  2. Hi Dinesh,

    Your videos are excellent. Thank you very much for doing this social service. I have learnt a lot.
    I have a workbook and a form to input data. The first control is a combo box and the control source list has three items. Electrical, Mechanical and Civil.

    When I add data, I want the data has to go to three different sheets “Electrical”, “Mechanical” or “Civil” depending on the selection in the control.

    If the worksheet with the name is not there, I want to insert a worksheet.

    Thank you in advance.



  3. Hi and Good evening to all,

    I was wondering if it is possible to have a look at the coding of the builtin-form.

    I want to build a similar form with some more features.



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.