'Learn how to use select case (also known as switch case).
Dim num As Integer
Dim strReply As String
Private Sub Form_Load()
Label1.Caption = "The number between 0 - 3."
Private Sub Command1_Click()
num = Int(Text1.Text)
Select Case (num)
strReply = "You typed in number one."
strReply = "You typed in number two."
strReply = "You typed in number three."
Case Default 'none of the above
strReply = "You typed in number zero"
'display our comment
Label1.Caption = strReply
||Visual Basic Source Code
I hope you found this Visual Basic tutorial useful!
Don't forget to mention Apron Tutorials in your References!
Ronny André Reierstad