Dim W As Integer
Dim M As Double
W = Val(InputBox("请输历好入重量"))
If W <= 50 Then
M = W * 0.25
ElseIf W >模烂游 50 And W <= 100 Then
M = 50 * 0.25
M = M + (W - 50) * 0.35
Else
M = 50 * 0.25
M = M + 50 * 0.35
M = M + (W - 100) * 0.45
End If
Print "价格为" &M
End Sub
加旦销个commmand button 把代码加进去
Private Sub Form_Click()Dim n As Integer
n = InputBox("哪亮历请输入键清公斤李搜数:")
If n <= 50 Then
q = n * 0.5
ElseIf n >50 Then
q = 50 * 0.5 + (n - 50) * 0.8
End If
Print q
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)