Library code snippets
Remove the selected items in a ListBox
By Kym Manson, published on 26 Oct 2001
This is how to remove all selected items from a listbox
Just do: Call ListBoxRemSel List1
replace List1 with the name of your listbox..
Sub ListBoxRemSel(lst As ListBox)
Do Until lst.SelCount = 0
If lst.Selected(a) Then lst.RemoveItem
a: a = a - 1
a = a + 1
Loop
End Sub
Related articles
Related discussion
-
VB6, SQL 2005 & DMO
by elajaunie3 (1 replies)
-
sending sms from pc
by sriraj20074 (0 replies)
-
Automating Excel from VB6.0
by epurdy (0 replies)
-
VB6 system conversion using VBA to Word 2007
by b.macgregor@vodamail.co.za (0 replies)
-
video not working with visual basic
by Jupiter 2 (9 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
Sub ListBoxRemSel(lst As ListBox)
Dim a as integer
Do Until lst.SelCount = 0
If lst.Selected(a) Then lst.RemoveItem a: a = a - 1
a = a + 1
Loop
End Sub
This thread is for discussions of Remove the selected items in a ListBox.