From the course: Excel VBA: Managing Files and Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add a ListBox to a UserForm

Add a ListBox to a UserForm - Microsoft Excel Tutorial

From the course: Excel VBA: Managing Files and Data

Start my 1-month free trial

Add a ListBox to a UserForm

- In the previous movie, I showed you how to create a text box that lets users enter text freely into a user form. The good news is that users can enter in whatever information they think is required. The bad news is they can misspell things or provide input you're not expecting. So for example, if you ask them to enter the name of the state, and either they don't know how to spell California, or they make a typo, then you might get multiple values. In this movie, I will show you how to limit those errors, while also restricting user data entry by using list boxes. My sample file is 06_03_listBox, and you can find it in the chapter three folder of the exercise files collection. So our goal is to create a list box, in this case that would allow a user to select one of four states. And that data is on sheet two. So I will display that worksheet. And you can see here in cells A1 through A5, I have a list of states,…

Contents