Combo Box Queries

I have a couple of queries concerning the combo box, I'm undertaking a very ambitious project for a new comer to VB and have got a form with a number of combo boxes on there that will be used for setting up the serial port.

I would like to know how firstly to get the first item to display in the combo box when the window is opened for example the list in one of the combo boxes is:

COM1

COM2

COM3 etc.

So when the form opens I want it to diplay COM1 not a blank drop down box. Secondly another box has a list of numbers however when displayed the numbers are not sequenced i.e. 1, 2, 3 etc. they actually display as 1, 10, 2, 3 etc.

Any help or pointers in the right direction would be greatly appreciated.

Thanks in advance.



Answer this question

Combo Box Queries

  • Peter Mourfield

    hi,

    double click your form and in form load event write

    Textbox1.selectedindex = 0

    hope this helps



  • Istvan Majercsik

    Many thanks shakalama works great, plus it has also helped me indirectly with another query so once again thanks.
  • juanborde

    you are welcome

  • Combo Box Queries