| | |
Listbox's Remove item
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Mar 2005
Posts: 71
Reputation:
Solved Threads: 3
•
•
•
•
Originally Posted by Turiya
"Invalid procedure call or argument"
As I try to remove an item from a listbox call List1 I try this code...
If List1.List(i) = List1.List(i + 1) Then List1.RemoveItem (i)
if the list contents are identical, remove one of them
but it doesn't work!
Can you try this one if it works for you.
For example you are trying to compare the column 1 of your list1.
if list1.listitems(i).subitem(1)=list1.listitems(i+1).subitem(1) then
list1.listItems.Remove 1
hope it gives you an idea.
newvbguy
•
•
Join Date: Mar 2005
Posts: 8
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by NewVBguy
Hi,
Can you try this one if it works for you.
For example you are trying to compare the column 1 of your list1.
if list1.listitems(i).subitem(1)=list1.listitems(i+1).subitem(1) then
list1.listItems.Remove 1
hope it gives you an idea.
newvbguy
![]() |
Similar Threads
- Removing an item from head of linked list (C)
- Bind ListBox to ADODB.Recordset (Visual Basic 4 / 5 / 6)
- link text boxes with listbox (VB.NET)
- Populating & Retrieving Data in a listbox : ASP.NET (w/ VB.NET) (ASP.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Filtering Data Reports....
- Next Thread: New to VB can someone help ?
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





