作者在 2011-10-20 13:37:36 发布以下内容
Option Explicit
Private Sub Command1_Click()
Dim gerensds As Single ' 个人所得税
Dim fd As Single
Dim gerensds As Single ' 个人所得税
Dim fd As Single
Dim renshu As Long '人数
gerensds = Text1.Text
gerensds = Text1.Text
If gerensds <= 45 Then '所得税小于45元时的处理
Text4.Text = 0.03
Text2.Text = 1
Text3.Text = gerensds / 0.03
End If
If gerensds > 45 Then '所得税大于45元小于345元时的处理
If gerensds <= 345 Then
Text4.Text = 0.1
Text2.Text = 1
Text3.Text = (gerensds + 105) / 0.1
End If
End If
If gerensds > 345 Then '所得税大于345元小于1245元时的处理
If gerensds <= 1245 Then
Text4.Text = 0.2
Text2.Text = 1
Text3.Text = (gerensds + 555) / 0.2
End If
End If
If gerensds > 1245 Then '所得税大于1245小于20000元时的处理
If gerensds <= 20000 Then
If Text2.Text <> "" Then
GoTo veryend
End If
End If
If Text2.Text = "" Then
MsgBox "本次没有输入人数,则默认人数为10人"
Text2.Text = 10
renshu = Text2.Text
Text4.Text = 0.25
End If
End If
If Text2.Text = "" Then
MsgBox "本次没有输入人数,则默认人数为10人"
Text2.Text = 10
renshu = Text2.Text
Text4.Text = 0.25
Text3.Text = Round((((gerensds / renshu + 1005) / 0.25 + 3500) * renshu) - (renshu * 3500), 2)
End If
veryend:
Text4.Text = 0.25
renshu = Text2.Text
On Error Resume Next
If gerensds > 7745 Then
If gerensds < 15490 Then
If renshu < 2 Then
MsgBox "当前个人所得税在7745元和15490元之间,人数最少为2人"
Exit Sub
End If
End If
End If
End If
veryend:
Text4.Text = 0.25
renshu = Text2.Text
On Error Resume Next
If gerensds > 7745 Then
If gerensds < 15490 Then
If renshu < 2 Then
MsgBox "当前个人所得税在7745元和15490元之间,人数最少为2人"
Exit Sub
End If
End If
End If
If gerensds >= 15490 Then
If gerensds < 20000 Then
If renshu < 3 Then
MsgBox "当前个人所得税在15490元和20000元之间,人数最少为3人"
Exit Sub
End If
End If
End If
If gerensds < 20000 Then
If renshu < 3 Then
MsgBox "当前个人所得税在15490元和20000元之间,人数最少为3人"
Exit Sub
End If
End If
End If
Text3.Text = Round((((gerensds / renshu + 1005) / 0.25 + 3500) * renshu) - (renshu * 3500), 2)
End If
If gerensds > 20000 Then '所得税大于20000元时的处理
MsgBox "您输入的所得税额有误,请检查"
End If
End Sub
MsgBox "您输入的所得税额有误,请检查"
End If
End Sub
Private Sub Command2_Click()
End
End Sub
End
End Sub