Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox that is a dropdown menu only and does not allow user entry

Status
Not open for further replies.

gautammalkani

Technical User
Sep 29, 2003
51
US
Hi

i created a combobox that has 8 values. however, I do not want the user to input their value on the combobox and I want to keep a dropdown menu (that is why i didnt go with a listbox). Please let me know if there is a way to do this.
Thanks for your help

Regards

Gautam


P.S Below is my attached code

Private Sub ComboBox1_Change()
Dim i As Single
Dim MyArray(8)
ComboBox1.ColumnCount = 8
For i = 0 To 7
MyArray(i) = i + 1
Next i
ComboBox1.List() = MyArray
End Sub
 

Assuming you're using the combobox from the Control Toolbox, set the "MatchEntry" parameter to True.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top