All pastes #544710 Raw Edit

Someone

public text v1 · immutable
·published 2007-06-06 15:35 UTC
rendered paste body
Dim blnOKtoRide As Boolean
    blnOKtoRide = True
    
    'Check if rider legal to ride
    If (Val(txtHeight.Text) < 45) Or (chkBack.Value = 1) Or (chkHeart.Value = 1) Then
    blnOKtoRide = False
    End If
    
    If (chkAdult.Value = 0) And (Val(txtAge.Text) < 10) Then
    blnOKtoRide = False
    End If
    
    'Display results
    If blnOKtoRide = True Then
        lblResult.Caption = "OK to Ride."
    Else
        lblResult.Caption = "Can't Ride!"
    End If