ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ComboBox Problems (https://www.excelbanter.com/excel-programming/327533-combobox-problems.html)

Darrin Henry[_2_]

ComboBox Problems
 
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 he

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.

*** Sent via Developersdex http://www.developersdex.com ***

Alen32

ComboBox Problems
 
try listbox



All times are GMT +1. The time now is 09:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com