Tuesday, May 12, 2009

example Select Case expression

example 1

Dim grade As String
Private Sub Compute_Click( )
grade=txtgrade.Text
Select Case grade
Case "A" result.Caption="High Distinction"
Case "A-" result.Caption="Distinction"
Case "B" result.Caption="Credit"
Case "C" result.Caption="Pass"
Case Else result.Caption="Fail"
End Select
End Sub

No comments:

Post a Comment