问题描述
我正在尝试制作我的程序,以便每当我将 Numericupdown 框的值更改为 +1 或 -1 时,它会自动更新此“Pod”文本框中的价格
People.Value 是 Numericupdown 框
'Calculating and displaying Prices for Liverpool Pod
If cBoxPod.Text = "Liverpool" = True And People.Value >= 0 Then
TotalPrice.Text = "£" & (9 * People.Value)
VAT.Text = ("£" & TotalPrice.Text * 0.2)
Subtotal.Text = ("£" & TotalPrice.Text * 0.8)
End If
有人帮忙吗?
解决方法
对于 +1,写 If X>0 then TotalPrice.Text =otalPrice.Text + "£" & (9 * People.Value):end if
对于 -1,写 If X