In this article, I will show you how to create Excel VBA Combobox using RowSource named range with four easy steps. While using Excel, you may need to do a different kind of interactional work. VBA combo boxes are one of them. We can use a VBA Combobox created with the help of a VBA user form using RowSource named range. Here, we will show you the whole procedure. This will help to increase your Excel skills.
How to Create Excel VBA Combobox Using RowSource Named Range: Step-by-Step Procedure
Here, you can see the dataset I will use for the whole procedure. The dataset has three columns, B, C, & D called Name, ID, and Contact Number. The dataset ranges from B4 to D10 cells. Moreover, I have added the necessary illustrations with every step for your better understanding. Follow the whole procedure step by step given below.
Step 1: Creating a Listbox
In this step, I will create a list box in the Visual Basic for Application window. Follow the steps one by one as described below.
- First, press Alt + F11 simultaneously to open the VBA editor.
- Then, go to the Insert tab.
- After that, select the Userform option.
- As a result, a userform with a toolbox will appear.
- From the toolbox, select the ListBox option.
- Consequently, a list box will appear in the userform.
Step 2: Renaming the Dataset
In this step, I will rename my dataset table for my convenience. Follow the procedure one by one. I hope you will enjoy the steps.
- First, select the cells from B4 to D10.
- Then, double-click on the name box at the top left corner of the picture. You will see the name box is filled with the value B4.
- Then, change the dataset name to CustomerList.
Step 3: Changing the RowSource & Column Count
In this step, I will change the RowSource and the column count. This is the most important step of the whole procedure. Follow the steps carefully.
- You will find a property box on the left side of the list box. In the next picture, I have shown the property box.
- Then, find the RowSource option in the property box.
- Then change the resource to CustomerList.
- Hence, press Enter.
- As a consequence, you will get the first column of data in the list box.
- Then, change the column count to 3.
- Consequently, this command will show the whole dataset in the list box.
- Then, press the Save icon and save the file.
- After that, press the Run icon or F5 button to show the list box in the Excel sheet.
Read More: Create ComboBox with RowSource in Excel VBA
Step 4: Final Result
Here, I will show the final result of this article. This is the shortest step of all four steps. Follow the given procedure.
- After pressing the run button of the VBA window, the command will show the text box in the Excel worksheet just like the picture given below.
How to Create Excel VBA Combobox Using Direct Range Reference
In this section of this article, I will show the procedures to create an Excel VBA combobox using direct range reference. This is the shortest possible way to create a combo box. Follow the steps one by one given below.
- Follow the steps described in the previous section of this article up to changing RowSource.
- Then, input the following RowSource name manually in the RowSource option.
- The column count will remain the same as the previous one.
- Then, press the Run button.
- As a result, this command will show you the list box with the data of the table like the picture given below.
Things to Remember
If the Properties tab is not visible on the left pan, you may access it by right-clicking the ListBox1 window and selecting Properties. The Properties tab will display as a consequence.
Download Practice Workbook
Please download the workbook to practice yourself.
In this article, I have tried to explain how to create Excel VBA combobox using RowSource named range. I hope, you have learned something new from this article. Now, extend your skill by following the steps of these methods. I hope you have enjoyed the whole tutorial. If you have any queries, feel free to ask me in the comment section. Don’t forget to give us your feedback.