|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiselect listbox
how can you remove the selected itemS in a mulitselect listbox using VB 6.0? thanks
|
|
#2
|
|||
|
|||
|
Quote:
You could loop through the entire list box and do this... Code:
If List1.Selected(i) = True Then List1.RemoveItem (i) End If Hope that helps, -Alias |
|
#3
|
|||
|
|||
|
i wrote it like this but its giving an error...invalid property array index.....?? =(
For i = 0 To courselstbx.ListCount - 1 If courselstbx.Selected(i) = True Then courselstbx.RemoveItem (i) End If Next i |
|
#4
|
|||
|
|||
|
ok i wrote it in reverse order and for some reason its working now...
For i = courselstbx.ListCount - 1 To 0 Step -1 If courselstbx.Selected(i) = True Then courselstbx.RemoveItem (i) End If Next i =) |
|
#5
|
|||
|
|||
|
Glad to hear I could help.
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Multiselect listbox |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|