Write VB program that collect marks for five different subjects & total.

Write VB program that collect marks for five different subjects & total.

 

Private Sub Command1_Click()

Dim S1 As Integer

Dim S2 As Integer

Dim S3 As Integer

Dim Total As Integer

S1 = Val(Text1.Text)

S2 = Val(Text2.Text)

S3 = Val(Text3.Text)

Total = S1 + S2 + S3

If Total >= 200 Then

MsgBox "U R Allowed"

Else

MsgBox "U R Not Allowed"

    End If

End Sub


Comments