VBI 67.PNG

Private Sub Command1_Click()
    Dim i, rn, tm, s1, s2, s3, s4, s5 As Integer
    Dim name As String
    Open "Marks.txt" For Input As #1
    Cls
    Print "Name", "Roll No", "Total Marks"
    For i = 1 To 5
        Input #1, name, rn, s1, s2, s3, s4, s5
        tm = s1 + s2 + s3 + s4 + s5
        Print name, rn, tm
    Next i
    Close #1
End Sub

VBO 67.PNG

Advertisements