Valhalla Legends Forums Archive | Visual Basic Programming | Problem

AuthorMessageTime
GoSu_KaOs
I got this:

[code]
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
[/code]

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.
January 30, 2005, 4:49 PM
QwertyMonster
Uh didnt you already post this somewhere else? Or am i wrong?
January 30, 2005, 9:27 PM
KkBlazekK
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.
January 30, 2005, 9:50 PM
GoSu_KaOs
Exactly
January 31, 2005, 3:21 PM
QwertyMonster
Oh.
January 31, 2005, 6:09 PM
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.
February 1, 2005, 3:56 PM
GoSu_KaOs
Note: No one gives a s hit about your day. Stick to the topic.
February 6, 2005, 9:16 PM
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.
February 6, 2005, 9:34 PM
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.
February 6, 2005, 10:05 PM
QwertyMonster
[quote author=LivedKrad link=topic=10371.msg98535#msg98535 date=1107727502]
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.
[/quote]

Agreed.
February 7, 2005, 3:32 PM
GoSu_KaOs
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.[/quote]

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.[/quote]

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."?"


February 9, 2005, 5:03 AM

Search