Dim a As Integer
Dim i As Single
Private Sub Command1_Click()
i = Text1.Text
If i < 0 Then a = 0
If i < 200 Then a = 1
If i >= 200 And i < 400 Then a = 2
If i >= 400 And i < 5000 Then a = 3
If i >= 5000 Then a = 4
Select Case a
Case 0
MsgBox ("非法输入")
Case 1
Text2.Text = Str(i)
Case 2
Text2.Text = i * (1 - 0.03)
Case 3
Text2.Text = i * (1 - 0.04)
Case 4
Text2.Text = i * (1 - 0.05)
End Select
End Sub
TEXT1是应的收入,text2中显示扣税后收入。
Dim i As Single
Private Sub Command1_Click()
i = Text1.Text
If i < 0 Then a = 0
If i < 200 Then a = 1
If i >= 200 And i < 400 Then a = 2
If i >= 400 And i < 5000 Then a = 3
If i >= 5000 Then a = 4
Select Case a
Case 0
MsgBox ("非法输入")
Case 1
Text2.Text = Str(i)
Case 2
Text2.Text = i * (1 - 0.03)
Case 3
Text2.Text = i * (1 - 0.04)
Case 4
Text2.Text = i * (1 - 0.05)
End Select
End Sub
TEXT1是应的收入,text2中显示扣税后收入。
解决方案 »
- 在WIN95下连接ACCESS的问题
- 如何将一个exe 程序和一下文本文件做在一起。
- LISTVIEW控件追加问题,
- VB里面有没有取从第几到第几个之间的字符串函数
- ★★★★★★★★★★ 顶星星了,散分!!!★★★★★★★★★★★★★
- 微软“最有价值专家”报名截止
- 等问题解决后,有分了,一定加到20分,请进来帮忙。
- CreatePolygonRgn ,这个函数谁会声明呀!!!!
- *****一个关于返回记录集中记录总数的小问题*************快来拿分!!!!!!!!!!! [:(
- 如何用VB控制声卡 的左右声道播放不同的声音文件?
- 很简单的问题,又来送分了啦!快点来拿啊!!!
- 有研究微软的编码器sdk的吗,为什么我用编码器应用程序能完成的工作用它的SDK却不能完成
TEXT3显示最大公约数Dim m, n, t As IntegerPrivate Sub Command1_Click()
m = Val(Text1.Text): n = Val(Text2.Text)
If m <= n Then t = m: m = n: n = t
r = m - n * Int(m / n)
While r <> 0
m = n: n = r: r = m - n * Int(m / n)
Wend
Text3.Text = n
End Sub
能把窗体发给我们..??
就现在.
我的EMAIL:[email protected]