Link to home
Start Free TrialLog in
Avatar of icecool
icecool

asked on

combo box

hi,

i have a number of questions here about combo box control.

1) how to select the 1st item in the combo box as default?
2) when user has selected one of the items, how do i get the value of the item?


thanks.
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DennisBorg
DennisBorg

  >1) how to select the 1st item in the combo box as default?

To select the first item in the combo box:

      Combo1.ListIndex = 0




   >2) when user has selected one of the items,
       how do i get the value of the item?

You would use the TEXT property of the combo box. For example:

   MsgBox Combo1.Text