我需要将用户输入的两个数字除以两个InputBox。放在第一个InputBox中的数字是成本,第二个InputBox中放置的数字是权重。我需要将这两个数字分开来给我单位价格。
If response = vbNo Then
retval = InputBox("Please Enter PO Cost")
Number_1 = "InputBoxValue"
retval = InputBox("Please Enter Net Weight")
Number_2 = "InputBoxValue"
Answer = Number_2 / Number_1
答案 0 :(得分:0)
Cost / Weight
会给你单位价格:
Sub Demo()
Dim cost, weight, answer As Variant
cost = InputBox("Please Enter PO Cost")
weight = InputBox("Please Enter Net Weight")
answer = cost / weight
MsgBox "Price per Unit is: " & answer
End Sub