vb编写出现问题,各位大仙帮帮我呀!!!!我是新手。。。
PrivateSubCommand1_Click()Ifm=0Thena=Val(30-i+Val(n/2))Else:a=Val(30-i-Val(m/2))EndIf...
Private Sub Command1_Click()
If m = 0 Then
a = Val(30 - i + Val(n / 2))
Else: a = Val(30 - i - Val(m / 2))
End If
End Sub
Private Sub Form_Load()
Dim a As Integer
Text1.Text = i
Text2.Text = m
Text3.Text = n
Text4.Text = a
End Sub 展开
If m = 0 Then
a = Val(30 - i + Val(n / 2))
Else: a = Val(30 - i - Val(m / 2))
End If
End Sub
Private Sub Form_Load()
Dim a As Integer
Text1.Text = i
Text2.Text = m
Text3.Text = n
Text4.Text = a
End Sub 展开
2个回答
展开全部
Command1_Click 这样写试试看
Private Sub Command1_Click()
Dim i As Integer
Dim m As Integer
Dim n As Integer
Dim a As Integer
i = Val(Texti.Text)
m = Val(Textm.Text)
n = Val(Textn.Text)
If m = 0 Then
a = Val(30 - i + Val(n / 2))
Else
a = Val(30 - i - Val(m / 2))
End If
Texta.Text = a
End Sub
工程示例见附件
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询