It looks you have a small file, just read all lines and average them as necessary
You might have to check for whether file exists and also deciaml value are present
Dim alllines = IO.File.ReadAllLines("textfile.txt")
If alllines.Length > 8 Then
Dim SixtValue As Decimal = Decimal.Parse(alllines(5))
Dim EighthValue As Decimal = Decimal.Parse(alllines(7))
Dim NinethValue As Decimal = Decimal.Parse(alllines(8))
Dim Average = (SixtValue + EighthValue + NinethValue) / 3
MessageBox.Show(Average.ToString)
Else
'Not a valid file
End If
Arjun Paudel