Reputation: 33
I am dynamically adding combo box to a form but i am not able to enable its auto-complete option. what property should we use to enable its auto complete option.
I Tried it as
Set DesiredControl = UserForm1.Controls.Add("Forms.Combobox.1", Visible)
DesiredControl.Left = 350
DesiredControl.RowSource = "Interface!xfd2:xfd6"
DesiredControl.Top = 20 * i
DesiredControl.Width = 175
DesiredControl.Height = 19
'DesiredControl.AutoComplete = enable
Thanks in Advance.
Upvotes: 0
Views: 3939
Reputation: 53623
Review the available properties in the VBE, and you will see some like:
MatchEntry
and MatchEntryRequired
.
You will want to use:
MatchEntry = 1 'fmMatchEntryComplete
And probably in conjunction with:
MatchEntryRequired = True
Upvotes: 3