Add Controls User Form

Adding controls to the user form in Excel – Step 2 of 3
Adding Combobox and Command Button Controls to a User Form

Last time we learnt how to add labels and text boxes to a user form.

Today we’ll add a combo-box and learn how to populate it with data using a named range. We’ll also add a command button and learn how to add code to this command button to perform certain tasks when it is clicked.

Using a single line of code we have also demonstrated how to show the form automatically when we open the workbook.

Further reading:
UserForms in Excel VBA – UserForm Basics; Add Controls dynamically at run-time using the Add Method; UserForm Controls (A Snapshot)

Leave a Reply

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