求指教这个VB代码怎么写?
1个回答
2016-03-26
展开全部
Private Sub Command1_Click()
'计算
Dim A As Integer, B As Integer, C As Integer, D As Integer, E As Integer
A = 4500: B = 0: C = 0: D = 0: E = 0
If Check1.Value = 1 Then B = 1000
If Check2.Value = 1 Then C = 800
If Check3.Value = 1 Then D = 600
If Check4.Value = 1 Then E = 500
Text1.Text = A + B + C + D + E
End Sub
Private Sub Form_Load()
Text1.Text = ""
Check1.Value = 0
Check2.Value = 0
Check3.Value = 0
Check4.Value = 0
End Sub
特别简单哟!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询