• Welcome to Valhalla Legends Archive.
 

Problem

Started by GoSu_KaOs, January 30, 2005, 10:49 AM

Previous topic - Next topic

GoSu_KaOs

I got this:


Private Sub Command1_Click()
Dim itm1 As ListItem, itm2 As ListItem
Dim str1 As String, str2 As String

For Each itm1 In listview1.ListItems 'loop the first listview
If InStr(1, itm1.Text, ":") Then 'just make sure ":" is in there
 str1 = Left$(itm1.Text, InStr(1, itm1.Text, ":") - 1) 'get the leftside of ":"
 str2 = Mid$(itm1.Text, InStr(1, itm1.Text, ":") + 1) 'get the rightside of ":"
 
  For Each itm2 In listview2.ListItems 'loop second listview
   If itm2.Text = str1 Then 'see if it matches the string
    itm2.Text = str2 'if it does, change it
   End If
  Next itm2
End If
Next itm1
End Sub


I need it to moidify the code so that it looks through the listview for the item in Text1.
I'll try to explain this as best as I can.

Lets say, I put "itemtext" in Text1.text. The code looks though the listview with the items that have the ":" (lets say listview2), Then it gets all the items that are on the right side of ":" . If any of them match up with Text1.text, it looks though the listview that doesen't have the ":" items (lets say listview1), if it finds one of the items that it got from listview2, it removes that item from listivew1.

QwertyMonster

Uh didnt you already post this somewhere else? Or am i wrong?

Blaze

He posted the non-working code before then people helped him out, thats the working code, but now he wants us to add something else.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

GoSu_KaOs


QwertyMonster


LivedKrad

Ahh, I'll love the day when I post my half-assed code (that I didn't write) onto a forum and say, "Hey, wouldn't it be cool if it ran better and was more efficient at doing it's job that I couldn't coherently describe?", and have it re-written and modified because I used a thoughtless repartee to an accusation that was right on target like "Exactly."? Write your own code.

Note: I'm having a bad day.

GoSu_KaOs

Note: No one gives a s hit about your day. Stick to the topic.

QwertyMonster

If your going to be like that, i do doubt many people will help.

But you know he is right, you give us code and expect us to make it work for you? How about you learn something and write your own.

LivedKrad

Heh, obviously no one gives a shit about your problem either, dolt. In addition, my post was right on topic. If you notice everything I said had to do about your requests on coding and your description of the problem.

Note: You suck at notes.

QwertyMonster

Quote from: LivedKrad on February 06, 2005, 04:05 PM
Heh, obviously no one gives a shit about your problem either, dolt. In addition, my post was right on topic. If you notice everything I said had to do about your requests on coding and your description of the problem.

Note: You suck at notes.

Agreed.

GoSu_KaOs

#10
Yo think I never tryed makin this s hit work? I spent 2 days tryin s hit out and it still aint workin. This forum is the last place I goto when I cant get something to work. In every thread I make, I get a stupid as$  reply like "learn vb then ask". That s hit is annoying. Thats why I stopped carin how all your days are. If you dont care about my problem, I dont care about your problem.

Quote
If your going to be like that, i do doubt many people will help.

Whats the point of this forum if no one wants to help? And dont even say this is for "hanging out". If all you do is hang out in this forum, that makes you a dork.

Quote
my post was right on topic. If you notice everything I said had to do about your requests on coding and your description of the problem.

Explain what my problem descrition has to do with " when I post my half-assed code (that I didn't write) " and "modified because I used a thoughtless repartee to an accusation that was right on target like "Exactly."?"