-
if then else selections
this is the Visual basics code
please let me know if its correct
==================
-------------------------------
Private Sub Command4_Click()
If txt1.Text = 1 Then
lbl1.Caption = "You Typed Choice 1"
Else
If txt1.Text = 2 Then
lbl1.Caption = "You Typed Choice 2"
Else
If txt1.Text = 3 Then
lbl1.Caption = "You Typed Choice 3"
Else
If txt1.Text > 3 Then
lbl1.Caption = "This choice is not available! Make ur choice from 1 to 3 ONLY!!"
End If
End If
End If
End If
End Sub
---------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks