vbi-23

Private Sub Command1_Click()
Dim name, sex As String, height, age, weight As Integer
name = InputBox("Enter Name ")
sex = InputBox("Enter Sex (M/F)")
height = InputBox("Enter Height (Cm)")
age = InputBox("Enter Age ")
weight = InputBox("Enter Weight")
If sex = "M" Or sex = "m" Then
    If age >= 18 And age <= 21 Then
        If height >= 165 Then
            If weight <= 75 Then
                MsgBox ("Name " & name)
            End If
        End If
    End If
End If
End Sub

vbo-23

VBO 23 MSGBOX.PNG

Advertisements