stefan1919

medalistsCase

Sep 30th, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  4.         Dim position As Integer
  5.         position = CInt(TextBox1.Text)
  6.         Select Case position
  7.             Case 1
  8.                 TextBox2.Text = "Gold Medlist"
  9.             Case 2
  10.                 TextBox2.Text = "Silver Medlist"
  11.             Case 3
  12.                 TextBox2.Text = "Bronze Medlist"
  13.             Case 4, 5
  14.                 TextBox2.Text = "You almost won a medal"
  15.             Case Else
  16.                 TextBox2.Text = "Nice Try"
  17.         End Select
  18.     End Sub
  19. End Class
Advertisement
Add Comment
Please, Sign In to add comment