I have a CSV file that im reading in, which has 3 fields and un-known lines, as it is constantly updated.
Now Im looking to add a counter, and grouping system...
Here is the code I have thus far:
VB Code:
Dim reader As StreamReader = File.OpenText("file.txt") Dim line As String = reader.ReadLine() Dim a() As String Dim j As Integer Dim Tester As String Dim LoopCountA As String Dim LoopCountB aS Integer = 2 While Not (line Is Nothing) a = line.Split(",") If LoopCountA <> a(1) Then Tester = Tester & LoopCountB & ") " Tester = Tester & a(1) & "," Tester = Tester & a(2) & vbNewLine LoopCountB = 1 LoopCountA = a(1) Else LoopCountB += 1 End If line = reader.ReadLine() End While reader.Close() mylabel.text = Tester
Now this sort of works... except for some reason i puts the highest number at the bottom of the list instead of next to the correct numbers. Any reason why? Anyone able to help me out?
Many thanks![]()




Reply With Quote