Dim x As Single
x = Val(InputBox("输入货物重量", , 50))
If x < 35 Then
MsgBox x * 5
ElseIf x < 70 Then
MsgBox x * 3
ElseIf x >御或 70 Then
MsgBox x 皮蔽* 2
End If
End Sub
Private Sub Command2_Click()
Dim x As Single
x = Val(InputBox("输入货物重量", , 50))
Select Case x
Case x < 35
MsgBox x * 燃拆州5
Case x < 70
MsgBox x * 3
Case x > 70
MsgBox x * 2
End Select
End Sub
Private Sub Form_Click()w = InputBox("请输野桥入物品重量(KG)")
If Val(w) <颂镇猛= 2 Then
MsgBox Val(w) & "KG,运费合计12元"
旅御ElseIf Val(w) > 2 And Val(w) <= 10 Then
MsgBox Val(w) & "KG,运费合计" & (Val(w) - 2) * 2 + 12 & "元"
Else
MsgBox Val(w) & "KG,运费合计" & (Val(w) - 10) * 5 + 12 + 8 * 2 & "元"
End If
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)