View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default Combobox Exact Match control

of course yuo do :)

Private Sub UserForm_Initialize()
ComboBox1.AddItem "A"
ComboBox1.AddItem "B"
ComboBox1.ListIndex = 0
End Sub


"Bishop" wrote:

I don't have a listindex option under properties. I do have the following
though:

listrows set to 8
liststyle set to 0
listwidth set to 0
tabindex set to 1
topindex set to -1

Should I be looking somewhere else?

"Patrick Molloy" wrote:

you can set the listindex to 0 (zero) which is like selecting the first item
alternatively set the combobox TEXT value to an item in the list

"Bishop" wrote:

I have a combobox in a userform that has say 10 list items. When the
userform pops up the combobox is initially empty. I can then enter any of
the 10 list items in the box. The problem is it will also let me choose
nothing... just leave it blank. How can I change it so that one of the 10
list items HAS to be selected so you can't just leave it blank?