From nilai Huruf |
Dim nilai As Double
Dim status As String
Sub kosongkan()
Txtnilaiangka.Text = 0
Txtnilaiangka.Focus()
Lblhasilstatus.Text = "?"
End Sub
Private Sub Btncek_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btncek.Click
nilai = Val(Txtnilaiangka.Text)
Select Case nilai
Case Is > 100
status = "error"
Case Is > 80
status = "baik sekali"
Case Is >= 65
status = "baik"
Case Is >= 55
status = "cukup"
Case Is >= 40
status = "kurang"
Case Is >= 0
status = "kurang sekali"
Case Is < 0
status = "error"
End Select
Lblhasilstatus.Text = status
End Sub
Private Sub Btnkosong_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkosong.Click
kosongkan()
End Sub
Private Sub Btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkeluar.Click
Close()
End Sub
End Class
0 komentar:
Posting Komentar