VBI 71.PNG

Private Sub Command1_Click()
    Dim SName As String
    Dim rn, i, c, s1, s2, s3 As Integer
    Open "Student.txt" For Output As #1
    c = 0
    For i = 1 To 10
        SName = InputBox("Enter Student Name ", "String")
        rn = InputBox("Enter Roll No ", "Integer")
        s1 = InputBox("Enter 1st Subject Marks ", "Integer")
        s2 = InputBox("Enter 2nd Subject Marks", "Integer")
        s3 = InputBox("Enter 3rd Subject Marks", "Integer")
        If s1 >= 35 And s2 >= 35 And s3 >= 35 Then
            Write #1, rn, SName
            c = c + 1
        End If
    Next i
    Close #1
    Print "Student Not Write A File ", 10 - c
End Sub

VBO 71.PNG

Advertisements