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.
Please help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
Thanks. That worked.
glad to have helped...:)
cbo1.listindex=1
cbo2.listindex=2
ps: pls replace cbo1,cbo2 with the respective names that u r using