You would have to modify your Open code.
Something like this
vb Code:
Sub DisplayGrades(ByVal gradesFiles As GradesFiles) Dim fileReader As StreamReader = Nothing fileReader = New StreamReader(FileName) Dim Grades As Integer = 0 Do While Not fileReader.EndOfStream Dim line As String = fileReader.ReadLine() Grades = +1 If displayif(Grades, gradesFiles) Then gradesListBox.Items.Add(line) End If Loop fileReader.Close() fileReader = Nothing End Sub
The way you had it before never iterated through the text file line by line-
-
It's how we learn
edit: I dont think displayif is needed at all. Not sure why it's there.
Good Luck!





Reply With Quote