Quote Originally Posted by Mythrandil
darn tht reads the whole file lol.

Code:
31-Mar-06,6015.20,6019.20,5961.40,5964.60,1650124544,5964.60
30-Mar-06,5959.20,6036.00,5959.20,6015.20,1496758016,6015.20
29-Mar-06,5935.70,5979.70,5927.20,5959.20,1742429440,5959.20
thats the file format,
i need the last value on each line. My plan was to take the last 7 chars from each line.
Anyone got a sure fire way of getting that last value for each line?

thanks
You can use the mid function to detemine the last 7 charecters from each line even if the size of the line is random.
VB Code:
  1. Private Sub Form_Load()
  2. Open "C:\test.txt" For Input As #1
  3.     While Not EOF(1)
  4.         Line Input #1, i
  5.         If Len(Text1.Text) = 0 Then
  6.             Text1.Text = Mid(i, Len(i) - 6, Len(i))
  7.         Else
  8.             Text1.Text = Text1.Text & vbNewLine & Mid(i, Len(i) - 6, Len(i))
  9.         End If
  10.     Wend
  11. Close #1
  12. End Sub
Add a textbox with multiline and it will add input the last 7 charecters with on each line.