Senin, 10 Januari 2011

contoh pengunaan fungsi if dalam visual basic

Private Sub Text1_Change()
If Val(Text1.Text) >= 9 Then
Text2.Text = "a"
Else
If Val(Text1.Text) >= 7 Then
Text2.Text = "b"
Else
If Val(Text1.Text) >= 6 Then
Text2.Text = "c"
Else
Text2.Text = "d"
End If
End If
End If

End Sub

Tidak ada komentar:

Posting Komentar