Link to home
Start Free TrialLog in
Avatar of Ckesey
Ckesey

asked on

VB6 Combo Box Clear

I have in a Visual Basic 6 program a Combo box full of data and I want the user to be able to select through the drop down menu and get a choice. I  have about 5 of these. I am wanting to have a RESET button at the bottom where it will set all of the combo boxes back to blank but still keep the values in the list.

Please help.

ASKER CERTIFIED SOLUTION
Avatar of taherzm
taherzm

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 taherzm
taherzm

also on loading the form if u want to select the first value then just write this in the form_load event

cbo1.listindex=1
cbo2.listindex=2

ps: pls replace cbo1,cbo2 with the respective names that u r using
Avatar of Mike Tomlinson
Just set the Text value of the ComboBox to "".

Private Sub Command1_Click()
    For i = 0 To Combo1.UBound
        Combo1(i).Text = ""
    Next i
    ' If they are not part of a control array then you have to do each one individually
End Sub

Idle_Mind
Avatar of Ckesey

ASKER

Thanks. That worked.

glad to have helped...:)