Hey Guys,
What i'm trying to do is write to individual .txt files depending if a string is found from items in a listbox.
code:
So far only the first .txt file is being saved, my logic must be skewed lol
any help would be appreciated :)
cheers guys
Graham
What i'm trying to do is write to individual .txt files depending if a string is found from items in a listbox.
code:
Code:
For Each itm As String In listBoxMain.Items
'// PLATFORM #1
If (itm.Contains("string1") Or itm.Contains("string2")) Then
Using SW As New StreamWriter("save\" & "Strings12.txt", True)
SW.WriteLine("Found - " & itm)
End Using
ElseIf (itm.Contains("string3")) Then
Using SW As New StreamWriter("save\" & "Strings3.txt", True)
SW.WriteLine("Found - " & itm)
End Using
End If
Next
any help would be appreciated :)
cheers guys
Graham