VBI 70.PNG

Private Sub Command1_Click()
    Dim SName  As String
    Dim rn, i As Integer
    Open "Student.dat" For Output As #1
    For i = 1 To 5
        SName = InputBox("Enter Student Name", "String")
        rn = InputBox("Enter Roll No", "Integer")
        Write #1, SName, rn
    Next i
    Close #1
End Sub

VBO 70.PNG

Advertisements