|
-
Feb 8th, 2011, 10:20 AM
#1
Thread Starter
Lively Member
Remove lines from list box based on a desired specific keyword
Hello guys,
I would be very grateful as usual if you could help me on this one.
Lets say I have a Listbox containing the a number of items - say filepaths and so on. Now I would want to be able to loop through and remove specific lines/items from the list box based on the keyword I offer. Perhaps this should be in a form of a function or something so that
For example, if I want to remove all entries which has the word "#EXT" or a symbol, all such entries would be removed.
I would be very grateful for a practical demonstration.
Thanx.
-
Feb 8th, 2011, 11:00 AM
#2
Re: Remove lines from list box based on a desired specific keyword
A simple For:Next loop will work. But work in reverse from .ListCount-1 To 0 Step -1
For each list item within that loop, use InStr() on the .List(n) property to see if the criteria exists & if so, remove it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|