1. Load the text file into a ListBox (Sorted = True - at build),
2. Loop thru an increment a counter if the next item is the same, if it reaches 3, delete that Item,
3. And I think thats it
What I am trying to do is make it so that when a user opens a txt file all the words listed one time will be put in lstUsers2 and all names listed twice will go into lstUsers3
After that it will take all the names in lstUsers2 and add them to lstUsers like such Column1: (word) Column2: (lvl 1)
and then
all the names in lstUsers3 and add them to lstUsers like such Column1: (word) Column2: (lvl 2)
Maybe I am over complifying things, but I think this methode would still work.
I will post the program in the next post.
Last edited by Animelion; May 12th, 2002 at 09:48 AM.
Originally posted by Animelion What I am trying to do is make it so that when a user opens a txt file all the words listed one time will be put in lstUsers2 and all names listed twice will go into lstUsers3
Maybe u could load the data into a third, hidden, listbox.
Then (after its sorted, and stripped of all 3 or more duplicates)
only load Items if they don't match the next Item in the list.
VB Code:
If whatever.List(?) <> whatever.List(? + 1) Then IstUsers3 Additem whatever.List(?)
Oh, and replace the On Error: code too!
(also, it should be "On Error Goto Error", without the ":", and there
should be an Exit Sub just above the Error: routine)