ComboBox Problems

D

Darrin Henry

Hello,
I'm having some issues with a combobox. I am using a combobox in a
userform, to give the users options to choose, but also give them the
ability to type in their own selection. The code I have is here:

Private Sub Contract1_Enter()
ComboBox1.DropDown
ComboBox1.AddItem "Option 1"
ComboBox1.AddItem "Option 2"
ComboBox1.AddItem "Option 3"
ComboBox1.AddItem "Option 4"
'Use drop-down list
ComboBox1.Style = fmStyleDropDownCombo
'Combo box values are ListIndex values
ComboBox1.BoundColumn = 0
'Set combo box to first entry
ComboBox1.ListIndex = 0

End Sub

The problems I'm having are two. When I run the form for testing, it
will only show me one option at a time, and I have to scroll down to get
the others. Also, it gives me a horizontal scroll bar, which I don't
want showing. Any ideas the properties, I'm missing to get this to look
right? As you can see I'm using the Enter event, since the Initialize
event did not seem to work. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top