How to Get Excel VBA Combobox with RowSource Named Range

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.

dataset of excel vba combobox rowsource named range


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.

creating a list box vba combobox rowsource named range

  • Then, go to the Insert tab.
  • After that, select the Userform option.

creating a list box vba combobox rowsource named range

  • As a result, a userform with a toolbox will appear.

  • From the toolbox, select the ListBox option.

creating a list box vba combobox rowsource named range

  • Consequently, a list box will appear in the userform.

creating a list box vba combobox rowsource named range


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.

Changing the RowSource & Column Count vba combobox rowsource named range

  • Then, find the RowSource option in the property box.

Changing the RowSource & Column Count vba combobox rowsource named range

  • Then change the resource to CustomerList.
  • Hence, press Enter.
  • As a consequence, you will get the first column of data in the list box.

Changing the RowSource & Column Count vba combobox rowsource named range

  • Then, change the column count to 3.
  • Consequently, this command will show the whole dataset in the list box.

Changing the RowSource & Column Count vba combobox rowsource named range

  • Then, press the Save icon and save the file.

Changing the RowSource & Column Count vba combobox rowsource named range

  • After that, press the Run icon or F5 button to show the list box in the Excel sheet.

Changing the RowSource & Column Count vba combobox rowsource named range

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.

Steps:

  • 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.
Sheet2!B4:D10

  • 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.


Conclusion

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.


Related Articles

Get FREE Advanced Excel Exercises with Solutions!

Tags:

Souptik Roy
Souptik Roy

Souptik Roy, a BSc graduate in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology, dedicated 1.5 years to the ExcelDemy project. During this time, he authored 50+ articles and reviewed 20+ for ExcelDemy. Presently, he is a designer and content developer at YouHaveGotThisMath and Brainor, sister concerns of ExcelDemy. His educational content spans science, mathematics, and grammar. Roy's interests include developing creative ideas, visualizing concepts with tools like Adobe Illustrator, and problem-solving within Microsoft... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo