Ok I understand, and actually it kind of works out because its almost 2 am here and I gotta work tomorrow. So I'm headed to bed.
Here is what I would do to get the text into an array:
VB Code:
'open the text file Dim al As New ArrayList() Dim fs As New System.IO.FileStream("customers.txt", IO.FileMode.Open) Dim sr As New System.IO.StreamReader(fs) Do While sr.Read al.Add(sr.ReadLine) Loop 'the lines array now contains the all the lines of text from the text file Dim Lines() As String = al.ToArray(GetType(String)) 'customers.txt does not exist, stop Else MessageBox.Show("File does not exist!", "File not found", _ MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End If




Reply With Quote