VB语言编程
来源:百度知道 编辑:UC知道 时间:2024/05/22 10:40:29
求VB大侠帮帮忙了
Private Sub Command1_Click()
Dim dProfit As Double
Dim dBonus As Double
Dim dRate As Double
If Not IsNumeric(Text1.Text) Then
MsgBox "请输入数字"
End If
dProfit = CDbl(Me.Text1.Text)
Select Case dProfit
Case Is <= 10
dBonus = 0.1 * dProfit
Case Is <= 20
dBonus = 10 * 0.1 + (dProfit - 10) * 0.075
Case Is <= 40
dBonus = 10 * (0.1 + 0.075) + (dProfit - 20) * 0.05
Case Else
dBonus = 10 * (0.1 + 0.075 + 2 * 0.05) + (dProfit - 40) * 0.015
End Select
Me.Text2 = dBonus
End Sub
Private Sub Command1_Click()
Dim s1 '提成
1: s = InputBox(" 请输入当月利润(万):")
If Not IsNumeric(s) Then MsgBox " 请输入数字!": GoTo 1
Select Case s
Case Is >