Chapter-2: Control Structures in Visual Basic 6.0
Chapter-2: Control Structures in Visual Basic 6.0
Terms To Touch.
If...Then...Else selection
structure
The If...Then...Else selection structure allows the
Method 1
If < condition 1 > Then
statement1
ElseIf < condition 2 > Then
statement2
ElseIf < condition 3 > Then
statement3
Else
Statement4
End If
Select...Case selection
structure
Select...Case structure is an alternative to
Select...Case selection
structure
e.g.: Assume you have to find the grade using select...case and
marks = txtAverage.Text
Select Case marks
Case 100 To 75
txtGrade.Text =Grade A"
Case 74 To 65
txtGrade.Text =Grade B"
Case 64 To 55
txtGrade.Text =Grade C"
Case 54 To 45
txtGrade.Text =Grade D"
Case 44 To 0
txtGrade.Text =Grade F"
Case Else
MsgBox "Invalid marks"
End Select
Thank You