'''''
'Create the streamreader, delimiter, lines, and fields
Dim psrdDisplay As System.IO.StreamReader
'''''
'Here's the delimiter I need to change
Dim pchrDelimiter() As Char = {ToChar(",")}
Dim pstrline As String
Dim pstrFields() As String
Dim pintcount As Integer
'''''
'Use a preset fielname and read the line
psrdDisplay = New System.IO.StreamReader("C:\File.txt")
pstrline = psrdDisplay.ReadLine()
'''''
'Stope reading when we hit a blank line
Do Until pstrline = Nothing
'''''
'Otherwise spilt the line into fields
ReDim Preserve EventRec(pintcount)
pstrFields = pstrline.Split(pchrDelimiter)
EventRec(pintcount).EventName = (pstrFields(0).ToString)
cboEvents.Items.Add(EventRec(pintcount).EventName)
EventRec(pintcount).EventDate = ToDateTime(pstrFields(1))
EventRec(pintcount).EventPrice = ToDouble(pstrFields(2))
EventRec(pintcount).EventDesc = (pstrFields(3).ToString)
'''''
'Increase the counter and read the next line
pintcount += 1
pstrline = psrdDisplay.ReadLine()
Loop
'''''
'Display a message bos when file is done opening and close
'the streamreader
MsgBox("Done Opening File", MsgBoxStyle.OKOnly, "Event Tracker")
psrdDisplay.Close()