16,555
社区成员
发帖
与我相关
我的任务
分享
Public Class frm_cjzhdj
Private Sub cmd_pd_Click(sender As System.Object, e As System.EventArgs) Handles cmd_pd.Click
If Val(txt_cj.Text) > 100 Or Val(txt_cj.Text) < 0 Then
txt_dj.Text = "你所输入的数据超出范围"
ElseIf Val(txt_cj.Text) >= 90 Then
txt_dj.Text = "优"
ElseIf Val(txt_cj.Text) >= 80 Then
txt_dj.Text = "良"
ElseIf Val(txt_cj.Text) >= 60 Then
txt_dj.Text = "中"
ElseIf Val(txt_cj.Text) < 60 Then
txt_dj.Text = "差"
ElseIf Trim(txt_cj.TextLength) = 0 Then
MsgBox("请输入数据")
End If
End Sub
Private Sub cmd_qc_Click(sender As System.Object, e As System.EventArgs) Handles cmd_qc.Click
txt_cj.Text = ""
txt_dj.Text = ""
End Sub
End Class
Private Sub cmd_pd_Click(sender As System.Object, e As System.EventArgs) Handles cmd_pd.Click
If Trim(txt_cj.TextLength) = 0 Then '先判断是否为空
MsgBox("请输入数据")
ELSEIf Val(txt_cj.Text) > 100 Or Val(txt_cj.Text) < 0 Then
txt_dj.Text = "你所输入的数据超出范围"
ElseIf Val(txt_cj.Text) >= 90 Then
txt_dj.Text = "优"
ElseIf Val(txt_cj.Text) >= 80 Then
txt_dj.Text = "良"
ElseIf Val(txt_cj.Text) >= 60 Then
txt_dj.Text = "中"
ElseIf Val(txt_cj.Text) < 60 Then
txt_dj.Text = "差"
End If
End Sub