Combobox newbie q

  • Thread starter Thread starter Peter Morris
  • Start date Start date
P

Peter Morris

Hi, I'm using VB 2005 express for the first time. I have used
other VB's before ie Excel, Access and VB6, but 2005 is
different to what I've used.


What properties do I set on a combobox to turn off the editable
box and restrict to the list of values?

How do I set the initial value displayed?
 
Don't use the 'express' edition, but in the regular edition, you would set
the controls 'DropDownStyle' to 'DropDownList' and you can use either the
'SelectedItem' or 'SelectedIndex' (zero based). You can set the style at
design time. In the forms load event you would select the initial item:
ComboBox1.SelectedIndex = 3 for example.
 
Back
Top