Hi I have code as follows which works nicely but it loads a bit slow. I would like to have a progress bar while the file loads my code is as follows

  With OpenFileDialog1

        .Filter = "Text files (*.txt)|*.txt|" & "All files|*.*"
        .FileName = ""
        If .ShowDialog() = DialogResult.OK Then

            FileName = .FileName

            Dim Infile1 = New StreamReader(.OpenFile)

            For i = 0 To MainGrid.RowCount - 1
                For j = 0 To MainGrid.ColumnCount - 7
                    MainGrid.Rows(i).Cells(j).Value = Infile1.ReadLine()





        End If

    End With

Also using accessing the streamreader through the file class and using .readalllines and iterating through the resulting array might be faster that reading the file one line at a time.