AutoComplete ComboBox C#

calendar_today Asked Apr 6, 2011
thumb_up 20 upvotes
history Updated April 16, 2026

Question posted 2011 · +4 upvotes

i’m loading huge database from excel (about 2000 items) to combobox. For example CD titles. Then i select 1 CD title from this 2000. I’d like to use here autocomplete, but i don’t know how..

       // Loading items from Excel
       for (rCnt = 2; rCnt <= range.Rows.Count; rCnt++)
            {
                for (cCnt = 1; cCnt < 2; cCnt++)
                {
                  str = Convert.ToString(saRet[rCnt,cCnt]);
                  // Loading items to ComboBox
                  ReferenceCombo.Items.Add(str);
            }

Accepted answer +20 upvotes

On your form, you need to set two properties for your ComboBox:

AutoCompleteMode should be Suggest, Append, or SuggestAppend. I recommend SuggestAppend.

AutoCompleteSource should be ListItems.

Excel VBA objects referenced (4)

Top excel Q&A (6)

+20 upvotes ranks this answer #28 out of 167 excel solutions on this site — top 17%.