Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim age As Integer Dim height As Double Dim weight As Double Dim name As String Dim status As String name = Txtname.Text age = txtage.Text height = txtheight.Text weight = txtweight.Text If age >= 18 And age <= 60 Then If height >= 170 And height <= 2000 Then If weight >= 60 And weight <= 80 Then status = " prceed " Else status = " Reject " End If End If End If txtoutput.Text = " name: " & name & vbCrLf & " Age: " & age & vbCrLf & _ " height: " & height & vbCrLf & _ " weight: " & weight & vbCrLf & " Status: " & status End Sub End Class
Please can someone help correct this code.Wanted the programme to display reject when number below 18
is entered on the 'Age' textbox
Edited by Vswe, 13 March 2010 - 02:54 AM.
Use Code tags when posting code


Sign In
Create Account


Back to top









