All pastes #16536 Raw Edit

Miscellany

public text v1 · immutable
#16536 ·published 2005-06-30 19:20 UTC
rendered paste body
Private Sub cmdAssignCounselor_Click()
    Dim strName As String
    Dim intName As Integer
    Dim strCounselor As String
    
    strName = UCase(txtStudentName.Text)
    intName = Asc(strName)
    
    If intName < Asc("G") Then
            strCounselor = "Andy Flemming"
        ElseIf intName < Asc("M") Then
            strCounselor = "George Larson"
        ElseIf intName < Asc("S") Then
            strCounselor = "Mary Reynolds"
        Else
            strCounselor = "Susan Ziegler"
            
    End If
    
    lblCounselor.Caption = strCounselor
    
    
End Sub