Searchable Combobox in Excel Userform VBA

Muhammad Zahid 6 Reputation points
2020-12-28T07:53:22.093+00:00

I am working on a management system in excel using userform
I want to make a searchable combobox where as i type all the list items having that spellings show in tha list and then with the down arrow i can select the required item when there are more than one items are showing in the list with selection of down arrow and by pressing enter that item should be selected
i am new in excel and as well as in vba
someone who can teach me step by step
Regards
Mahar Muhammad Zahid

Microsoft 365 and Office Excel For business Windows
{count} votes

1 answer

Sort by: Most helpful
  1. HansV 966 Reputation points MVP
    2020-12-28T11:39:35.597+00:00

    A userform combo box will do that automatically for you.

    Make sure that the items you want to see in the dropdown list are stored in a column on a worksheet, for example in A1:A20 on Sheet1.
    The list should be sorted in ascending order.

    In the Visual Basic Editor, select Insert > UserForm.
    Activate the Toolbox.
    Click on the Combo Box button to select it, then click on your userform.
    In the Properties pane, set the RowSource to the address of the list - Sheet1!A1:A20 in the above example.
    Set the ControlSource to the address of the cell that should be filled with the selected entry (if desired, otherwise leave the ControlSource empty)

    That's all!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.