[RESOLVED] Listbox refresh
Hy everyone,I'm new here and also I'm VB6 newbie who needs some help.
I'm working at a project with 2 listboxes,when I select a item from a listbox I want few items from the second listbox to dissappear,this worked by removeitem method.
Anyway after selecting another option I get Runtime error 5 & refresh command doesn't restore initial items.
Screenshots:
Intially:
http://img838.imageshack.us/img838/3...0812143547.png
Selecting second option:
http://img97.imageshack.us/img97/437...0812142321.png
Clicking on first option to restore intially listbox items-nothing happens:
http://img153.imageshack.us/img153/6...0812142334.png
Code:
Private Sub lstDB_Click()
Select Case lstDB.Text
Case "All"
lstCid.Refresh
Case "2000"
lstCid.RemoveItem 8
lstCid.RemoveItem 7
lstCid.RemoveItem 6
lstCid.RemoveItem 5
Case "2000 PDA/Smartphone"
lstCid.RemoveItem 2
lstCid.RemoveItem 3
End Select
Hope I'm clear enough!Thanks!