Using the Combo Box control
We still need to create a list of values for the Combo Box. Users must select a department from a pre-defined list, rather than being unsure about the possible options. To populate the Combo Box, we first need to create that lookup list.
In this recipe, we will be using the Combo Box control.
Getting ready
Make sure that Controls.xlsm
is still open. New Record Entry Form should be visible, and both the project window and the properties window should be visible on the left of the VBA Editor.
How to do it…
We need to do the following:
- Before configuring the Combo Box, we need to create a lookup list. Switch to Excel and insert a new sheet. In Sheet2, create the following list:
- Once done, select the list and save it as a range, (click in the Name Box, then type the word
Department
, and press Enter), calling it Department. - Switch back to the UserForm and select the Department...