求大神帮我写个vb 采样程序。要求如果实际数量是a,那么抽样数量为b。 10
求大神帮我写个vb采样程序。要求如果实际数量是a,那么抽样数量为b。我好多年不用vb了,想不起来了。大体写了个,总是不对,强迫症犯了。请大神帮我看看哪里错误。感谢Priv...
求大神帮我写个vb 采样程序。要求如果实际数量是a,那么抽样数量为b。我好多年不用vb了,想不起来了。大体写了个,总是不对,强迫症犯了。请大神帮我看看哪里错误。感谢
Private Sub Command3_Click()
Dim a As Long
Dim b As Long
a = Val(Text1.Text)
If 0 < a <= 10 Then
Text2.Text = a
ElseIf 10 < a <= 500 Then
Text2.Text = 10 + (-Int((10 - a) / 100))
ElseIf 500 < a <= 2000 Then
Text2.Text = 14 + (-(Int(500 - a) / 200))
ElseIf a > 2000 Then
b = 22 + (-Int(((2000 - a) / 400)))
Else
MsgBox "请输入正确实际数量"
End If
End Sub 展开
Private Sub Command3_Click()
Dim a As Long
Dim b As Long
a = Val(Text1.Text)
If 0 < a <= 10 Then
Text2.Text = a
ElseIf 10 < a <= 500 Then
Text2.Text = 10 + (-Int((10 - a) / 100))
ElseIf 500 < a <= 2000 Then
Text2.Text = 14 + (-(Int(500 - a) / 200))
ElseIf a > 2000 Then
b = 22 + (-Int(((2000 - a) / 400)))
Else
MsgBox "请输入正确实际数量"
End If
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询